Commit Graph
117156 Commits
Author SHA1 Message Date
amoyaux c914df5a36 [IMP] stock,mrp,purchase: split _run method and move it to rules
Previously mrp, stock and purchase used _run methon on procurement
group and start with a if checking for the action type. This commit
instead launch a specific method depending the rule's action's type

Also _run method and their submethod used in procurement group
was always called with a rule. Thus we choose to move this method
on the rule object himself.
2017-09-08 17:08:06 +02:00
Fabien Pinckaers 283242dbea [REF] procurement: remove
Since previous commit 70b67d1 procurements order are
not needed anymore see previous commit for more explanations.
2017-09-08 17:08:06 +02:00
Fabien Pinckaers 0e4f3bb959 [IMP] stock: remove procurement orders to fufill immediately
This removes the procurement.order model. To fufill their needs SO, PO, MO and
stock moves now call the _run method of the relevant procurement.group.

This mecanism is now only used for stockable product, tasks now uses their own
independent mecanism.

The _run method will check all the applicable rules and create directly the
needed model to fufill the need.

The modules stock, purchase, mrp, extends the _run method to implement their
specific strategy relevant for the rule type they define.

If an exception happens the message will be logged as a mail messsage on the
source model, for example, if a sales order cannot be fufilled the salesperson
will now see directly the reason.

OLD commit messages:
[WIP] procurement: removing procurement.order in stock, sale, purchase, sale_stock. WIP
fixup! [WIP] procurement: removing procurement.order in stock, sale, purchase, sale_stock. WIP
[IMP] Basic tests
[FIX] test not necessary anymore
[FIX] remove unnecessary print statement
[FIX] unnecessary test + why passing warehouse worked before?
[IMP] purchase: one move by purchase order line
[FIX] purchase: correct inventory tests and pass move_dest_ids among procurements
[FIX] because of bad cherry-pick merge
[IMP] make mrp pass by adding move_dest_ids there too
[IMP] tests of sale_mrp, no need for cancelpropagation then
[IMP] better to consistently use recordsets also for one2many
[FIX] purchase_requisition
[FIX] Exceptions should trigger errors, which should be caught in the tests
[FIX] sale_mrp: remove usage of procurement.order and use sale order name instead of sol
[FIX] stock_dropshipping: add sale_line_id on purchase_line_id
[FIX] Remove pdb
[IMP] add stock_dropshipping files
[IMP] stock: search carrier through sale line instead of procurement group
[IMP] add procrule test and preision needed when updating sol
[FIX] sale_order_dates + [IMP] procurement exceptions by scheduler
[FIX] No need to return task
[IMP] move file as name changes and add corrections
[FIX] Continue Run Schedulers wizard fix
[FIX] name issues of takss
[FIX] updating sale order line, but there is still a problem with the recompute
2017-09-08 17:08:05 +02:00
Martin Geubelle 3ae9a6b537 [FIX] web: Kanban: allow to resequence a record twice
Before this rev., it was not possible to move a record (in the same column)
at the top and then move another record above it.

There is special class `o_updating` added on record being edited to avoid
moving them. This class is normally removed afterwards when re-rendering the
record.

When resequencing, the record is re-rendered so the class won't be removed ;
this is why it shouldn't be added in the first place (same behaviour as saas-15).
2017-09-08 16:35:45 +02:00
David Monjoie ca496c2198 [FIX] board: fix lxml import after P3 migration
Encoding 'unicode' is not supported by xml.etree.Elementree.toString
but it is supported by lxml.etree.toString
2017-09-08 15:34:15 +02:00
Cedric Snauwaert ad2dc1e7cd [FIX] account: settings, selection of coa should be visible iff there is no accounting entries defined 2017-09-08 15:29:38 +02:00
qdp-odoo 97070bfcfa [IMP] account: add partner_id in the opening entry form view.
Just in case users want to split the initial balance on receivable/payable accounts by partner
2017-09-08 15:22:27 +02:00
Jérome Maes dee87e106a [FIX] sale: access error when confirming SO if you are not admin
Use sudo to access config parameters. Previously it was an ir values
but now we have to access a config parameter as superuser.
2017-09-08 13:57:37 +02:00
Raphael Collet d7190a3fd0 [IMP] api: reindex the record cache to improve cache hit
The record cache is indexed by `(field, record_id, key)`, where `key` depends
on the environment.  The key is either `(cr, uid, context)` or `(cr, uid)`,
depending on whether the field's value is context-dependent.  As most fields
are not context-dependent, this should avoid some cache prefetching when
swiching context.
2017-09-08 13:21:00 +02:00
Raphael Collet 32a58c0db3 [REF] api: wrap the record cache implementation into a class
This makes the rest of the ORM independent from the cache's implementation, and
rely on a well-defined API instead.
2017-09-08 13:21:00 +02:00
Raphael Collet 64e945aa44 [REF] models: make the API of RecordCache more consistent
Make `RecordCache` work on a single record only, and implement a mapping from
field names (only) to values.

Also add explicit methods on `RecordCache` to wrap special behavior in cache,
and simplify all special values as a wrapper for a getter function.

The record cache may contain regular and special values.  Modify `RecordCache`
so that only methods ending with `_value` check for regular values.  The
dictionary methods considers both regular and special values as equivalent.

    name in record._cache               # test if cache has a value
    iter(record._cache)                 # iterate on values
    record._cache[name]                 # get value
    record._cache.get(name)             # get value or default

    record._cache.has_value(name)       # test if cache has a regular value
    record._cache.get_value(name)       # get regular value or default
2017-09-08 13:21:00 +02:00
Nicolas Martinelli cbee332bb1 [FIX] mrp_repair: default location in multi-company
1. Create a new company
2. Create a user with access to this company and with access to repair
3. Connect as the new user
4. Try to create a new repair and the stock.warehouse access error
   should appear

opw-769160
2017-09-08 13:14:36 +02:00
Martin Geubelle 14cb9af0d6 [FIX] web: only send changed fields on one2many after onchange
The server response to an `onchange` on a one2many is a list of
commands. In case of one2many update (command 1), the server
returns all fields (and not only the modified ones).
When saving the record, this is the client responsability to
specify which fields really changed.

Before this commit, all fields were sent at `write` and not only
the changed ones. This was causing issues when the user couldn't
write on the field ; an error was triggered even though the user
didn't change anything.

To fix this, we only tag as changed (in the datapoint `_changes`
attribute) the fields that have a different value after the onchange.
2017-09-08 12:27:43 +02:00
Yannick Tivisse 736e850a8e [FIX] mass_mailing: Use werzeug.urls instead of urlparse
werkzeug.urls is used instead of urlparse since https://github.com/odoo/odoo/commit/01e35141479b8dfc4a390518f89fc52e7cec5396#diff-f72572eec7ff7bbeca23ba84eda9fc38L35

Error introduced by forwardport https://github.com/odoo/odoo/commit/ba294a397e6ee3eb7dd0153f0726a880f6b77459
2017-09-08 11:51:28 +02:00
Christophe Simonis e518f618bb [FIX] website_sale: should explicitly depend on sale_payment 2017-09-08 11:13:58 +02:00
Tejas Shahu 17e432d9a6 [FIX] mail: systray: next activity not closed on click
Before this commit, when you clicked on the dropdown, the action
was executed but the dropdown wasn't closed.
This issue was very annoying on mobile because the dropdown is in fullscreen
and we couldn't see the result of the action.

Now, we removed the "stopPropagation" which stops the bootstrap event
to close this dropdown.
2017-09-08 11:12:36 +02:00
Rohan Patel 7c1e1e5afc [IMP] project: limit task priority to 0 or 1
Because, you know, priority is more about shared favorite than priority.
I love using shared favorites and not being able to prioritize my tasks.
2017-09-08 10:15:08 +02:00
Thibault Delavallée 3ce680ac19 [FIX] crm, hr_recruitment: better compute default values for calendar event
* fix issue with ref not using module as xml id left part;
 * improve computation of applicant_id / res_model + res_id in hr_recruitment;
2017-09-08 10:14:23 +02:00
Moises Lopez - https://www.vauxoo.com/ 4e2db85f2e [FIX] base_address_extended: default to Null instead of empty string
for computed street fields.

Qweb reports delete the node if the value is Null but won't if the value is an empty string. And then, l10n_mx_edi module has errors because there are nodes with empty string and the minimum value is one char.

Courtesy of Vauxoo. Was PR #17169

Backport in Saas-14 from opw-770430
2017-09-08 10:13:30 +02:00
Lucas Perais (lpe) 825c7c1ed6 [FIX] website_forum: fix display of images in a post
Before this commit, the images were messing up the layout of the post, with text uglily lying on their right
This commit solves the issue at rendering of the post, to ensure that current posts on prods be affected in a reversible manner.
Also, we want this commit to have minimal impact

OPW 769721

closes #19322
2017-09-08 09:44:30 +02:00
Lucas Perais (lpe) 7805cf5fef [FIX] tools: fix amount to text in fr and nl
Correct rendering of 70 and 90 in french
And manage inversion [unit]-en-[tens] in nl

opw 757048

closes #19297
2017-09-08 09:40:56 +02:00
Yenthe V.G 1d769ad5a7 [FIX] web: Don't show buttons when model has readonly access
PR #19314
2017-09-08 09:23:44 +02:00
Ravi Gadhia 44a3c72e0f [IMP] mail: store composer when switching channels 2017-09-08 08:44:04 +02:00
Joren Van Onder 168ca86592 [IMP] stock: let the user know what product needs a lot/serial number 2017-09-07 19:43:20 -07:00
Hetashree Chauhan 6bcc86497d [IMP] mrp: reposition working_state toggle on workcenter kanban cards
Move it to the bottom right of the card.
2017-09-07 19:43:20 -07:00
Hetashree Chauhan 0237200d92 [IMP] mrp: uppercase button text on workcenter kanban cards 2017-09-07 19:43:20 -07:00
Joren Van Onder 9d64002b58 [IMP] stock: check serial/lot numbers before backorder wizard
To avoid the error asking to set serial/lot numbers popping up after
the user clicks 'Create backorder'.
2017-09-07 19:43:16 -07:00
Hetashree Chauhan c699125708 [IMP] stock: add help on show_operations 2017-09-07 19:05:54 -07:00
Hiral Bhavsar 21931b7b6a [IMP] stock: display quant_ids similar to current_picking_move_line_ids 2017-09-07 14:23:29 -07:00
Hiral Bhavsar eef695f0d5 [IMP] mrp: make 'Inventory Moves' on MO display stock move lines
Also display this stat button in 'cancel' state.
2017-09-07 14:23:29 -07:00
Hiral Bhavsar 9022d84e00 [IMP] mrp: rename final_lot_id string
'Current Lot' -> 'Lot/Serial Number'
2017-09-07 14:23:28 -07:00
Hiral Bhavsar 26ce58eb2c [IMP] stock: remove 'Content' tab from package form view. 2017-09-07 14:23:28 -07:00
Hiral Bhavsar ff97f761ea [IMP] stock: clean up traceability report
- Add new column 'LOT/SERIAL NUMBER'.
- Add label 'Date' for date
- Column 'LOCATION SOURCE' and 'LOCATION DESTINATION' are merged into
  'LOCATION'.
2017-09-07 14:23:28 -07:00
Hiral Bhavsar 0bc29de024 [IMP] stock: group tracked products in stock.move.line
When the picking type doesn't have use_create_lots or
use_existing_lots the products should end up in one
stock.move.line. The user will then be able to validate the picking
without specifying serial/lot numbers.
2017-09-07 14:23:28 -07:00
Hiral Bhavsar 39d5881b93 [IMP] stock: restructure product.valuation.tree view
And display stock_value with a currency symbol.
2017-09-07 14:23:27 -07:00
Hiral Bhavsar f2926823e8 [IMP] stock: remove field 'method' from 'product.putaway'
Because it wasn't used anymore.
2017-09-07 14:23:20 -07:00
Thibault Delavallée 7371b550f1 [FIX] sale_payment: sudo tx creation as anonymous users may access it 2017-09-07 18:25:35 +02:00
Thibault Delavallée 010960d5e8 [FIX] sale_payment, website_(quote/sale): fix method typo
sale_payment method to check or create a new transaction when paying
a sale order should be named _check_or_create_sale_tx and kept private
like account_payment one. Both versions exists. This commit fixes
the typo.
2017-09-07 18:25:35 +02:00
Thibault Delavallée fa0ccfdb62 [FIX] sale: get Invoice Orders contextual action back
Commit 55549f1e61 changed the way bindings between action and
contextual menu entries are generated. However a typo was introduced
linking Invoice Orders to sale order lines instead of sale orders.
2017-09-07 18:25:35 +02:00
Thibault Delavallée 57cba85c0d [IMP] calendar: add test for meeting activities
Those tests are not a complete flow test but at last it tests that
activities and calendar events are correctly created / unlinked.
2017-09-07 17:55:58 +02:00
Akash Bhavsar 9568b1525b [IMP] mail, calendar: integrate meeting activities with calendar
This commit improves the use of mail activities by allowing their
integration with the calendar. Activity types now have a category
field that can be used to trigger some specific behavior. First
specific behavior is to have activity types of meeting category.
Creating activities of this type trigger a jump to the calendar to
schedule the meeting. Meeting activities and calender events are
linked to be able to easily navigate through the document, its activities
and its meetings.

Configuration is done using a category on activity types instead of some
hardcoded "meeting" activity to avoid issues with master data and to be
able to choose which activity type should trigger this behavior.
2017-09-07 17:55:57 +02:00
Akash Bhavsar be23a75c0e [IMP] calendar: add generic res_id and res_model_id to link documents and events
Linking calendar.event to documents is a good idea to allow searching and
filtering meetings. It also allow to have a link to the document from a
meeting and ease navigation.

There are currently some specific links (opportunity_id for crm.lead and
applicant_id for hr.applicant) but this commit allows some generic
document linking through a res_model_id / res_id fields pair.
2017-09-07 17:55:57 +02:00
Thibault Delavallée fc4251fef9 [FIX] calendar: avoid recomputing fields at unlink
As unlinking calendar events leads to separate flows depending on the
event being recurrent some fields are recomputed in cache even if records
have already been deleted. This leads to issues when computing recurrence
and accessing some event data. Let us therefore avoid recomputing fields
when unlinking events.
2017-09-07 17:54:02 +02:00
Akash Bhavsar 0ff5acee96 [FIX] web: allow default value for calendar quick create
* fix typo, widged is actually widget;
 * support name coming from context for calendar event quick create;

Support of context could be made generic in quick create mechanism but
in the meantime this fix is considered as sufficient for the use case
we have.
2017-09-07 17:53:50 +02:00
Goffin Simon 55b8a454c9 [FIX] mrp: Unbuild order with serial number
When unbuilding an order with serial number, the quant with the right
serial number must be found in the system either it raises an UserError
explaining  what's the problem.

PS: A problem was found when we tried to unbuild two times the same MO.
After the first unbuild, we deleted it and recreated the same one.

opw:748472
2017-09-07 16:39:58 +02:00
stefanorigano af130256e3 [REF] web, mail: review silver colors
This is also meant to solve a bug in firefox: the scrollbar was the
same color as the background by bad luck.

+ Adapt kanban view borders
2017-09-07 16:36:29 +02:00
stefanorigano 9ec47d3735 [REF] web: set better alignments in top menu 2017-09-07 16:35:41 +02:00
Nicolas Martinelli 6879409723 [FIX] im_livechat: unsupported locale
- Set the browser to language 'Spanish (Latin America)' ('es-419')
- As a public user, open a livechat session.

The session doesn't open.

The root cause is the creation of a mail channel which contains
translatable fields (e.g. name). This attempts to create translations
in the 'es_419' language. However, this locale doesn't exist in Odoo,
and it triggers the constraint 'lang_fkey_res_lang'.

In this specific case, there is no real reason to translate the channel
name. Therefore, we simply avoid it thanks to a context key.

opw-766489
2017-09-07 15:54:26 +02:00
Kirti Choudhary be7ac3a503 [FIX] mass_mailing: urlparse is replaced with werkzeug.urls.url_parse 2017-09-07 14:17:21 +02:00
Sanjay Jamod 35cdf9076f [IMP] web: improved date field usability
- datepicker doesn't default to current date by default
- date string in the input is now selected when clicking the field
- adapted the existing tests to the new changes
2017-09-07 13:43:01 +02:00