Commit Graph
102412 Commits
Author SHA1 Message Date
Thibault Delavallée bdd2080d04 [TESTS] stocl: Some new tests and yml to py
Including

 - unit tests for test/inventory.yml
 - unit tests for test/move.yml
 - unit tests for test/shipment.yml
 - integration of test_reuspply.py
 - integration of test_owner_available into test_product.py

New tests are temporarily deactivated. Indeed they rely on onchange methods
that will change during migration. Tests will be reactivated after migration
and updated.
2016-04-29 12:18:29 +02:00
Nicolas Martinelli 42bb99d9c4 [IMP] purchase_requisition: update translations 2016-04-29 10:44:01 +02:00
Fabien Pinckaers ff110b0ed8 [IMP] purchase_requisition: blanket orders and usability cleaning
Improved usability & code cleaning:
  - Support for blanket orders, in addition of purchase tenders
    ("Purchase Agreements")
  - Create a RfQ in one click, no wizard anymore
  - Control of quantities really purchased
  - Better control of side-effects thanks to purchase requisition types
  - JS code removed (not necessary)
  - Workflow removed

Closes #11666
2016-04-29 10:43:49 +02:00
Christophe Simonis 3938fb27e5 [FIX] sale: confirmation_date field was named date_confirm in 8.0 2016-04-28 17:27:02 +02:00
Aaron Bohy 9174cd94d5 [FIX] mail: Discuss: channel autocomplete dropdown
The content of this dropdown must be html (for the 'Create' line). I
accidentally removed it at 33beee5.
2016-04-28 15:05:42 +02:00
Dhaval Panchal b7b78e1760 [IMP] sale: Add 'Order Reference' in SO report
The ability to group by sale order reference was missing
2016-04-28 14:27:46 +02:00
Aaron Bohy 89939249e5 [IMP] mail: sidebar autocomplete: redirect to already opened DM
Before this rev., if the user clicked, in the autocomplete dropdown, on an
already opened DM, nothing happened. Now, it redirects to that DM.

Also clear the input once a partner is selected.
2016-04-28 10:56:32 +02:00
Rohan Patel 33beee5b08 [IMP] mail: Discuss: lookup in JS cache before doing RPC
When opening a new DM from the Discuss sidebar or from a chat window, and
when inviting people to a channel, first search for a match in the prefetched
partners (basically, the employees), and only perform the im_search RPC
(extending the research to all users) if there is no match.

Also sort the results by name.
2016-04-28 10:56:31 +02:00
Joren Van Onder 5c545e3244 [IMP] point_of_sale: rewrite frontend tests
There used to be some acceptance tests but they have not actually been
run since 8.0.

These acceptance tests are very useful for the POS because the POS is a
somewhat unusual module and it happens occasionally that a change in
another module unintentionally breaks the POS.

Another reason these tests are nice to have is because the POS
duplicates a lot of calculations in JS because it's meant to be able to
work offline (eg. calculation of taxes, orderline totals etc.). Subtle
differences (eg. rounding) between the frontend JS calculations and the
backend calculations make up the most common category of bugs in the
POS. These frontend tests will make it easy to write tests for these
scenario's. When phantom_js finishes we look through all the received
pos.order records and see that all of them are paid. If there would be a
difference between frontend and backend calculations the order would not
have the paid status because the payment on the order would be different
from the total. An example test for a previous bug has been included.

This will also come in handy for testing the upcoming pricelist
functionality that will be implemented in the POS.
2016-04-28 10:26:09 +02:00
Joren Van Onder 5dc6828631 [FIX] point_of_sale: get rid of support for barcodes on packagings
This was removed in the backend in
ffd76df007. The POS however still had some
leftover code that referenced it, causing ORM warnings.
2016-04-28 10:26:09 +02:00
Shivam Dudhat 1b765ab1b7 [MIG] event_sale: testcase convert from yaml to python 2016-04-28 08:46:07 +02:00
Shivam Dudhat 96fb5d41d9 [MIG] event_sale : migration to new api 2016-04-28 08:46:06 +02:00
Shivam Dudhat 60609eaab2 [MOV] event_sale : reorganize module directory 2016-04-28 08:46:06 +02:00
Jérome Maes c5baaa3bdc [REF] google_account : code cleaning
- remove unused helpers
- add command in case of deeper refactoring one day ...
- better variable naming
- use contants for Google services urls
- add docstrings
2016-04-27 16:35:45 +02:00
Deep Bundela 3e1fb87e93 [MIG] google_account: migrate into new API 2016-04-27 16:35:45 +02:00
Deep Bundela 65ec248883 [MOV] google_account: restructure module directory 2016-04-27 16:35:45 +02:00
Deep Bundela b2a9df57d7 [REM] google_account: remove unused google_account.xml file
google_account.xml file is having same code in data/google_account_data.xml
so removed google_account.xml
2016-04-27 16:35:45 +02:00
Paramjit Singh Sahota 5c28b3d4a2 [MIG] base_setup : migrate to new api 2016-04-27 16:21:42 +02:00
Jérome Maes fce8735b1a [REM] base_setup : remove unused terminology wizard 2016-04-27 16:21:42 +02:00
Paramjit Singh Sahota 4fad287888 [MOV] base_setup: reorganize module directory and files
Also remove security directory, since it contained empty files.
2016-04-27 16:21:42 +02:00
sha-odoo f3a3cddf85 [IMP] sale: move project_id to Other Info in sale.order form view 2016-04-27 16:16:26 +02:00
Géry Debongnie b1becf98e9 [FIX] point_of_sale: prevent crash when loading
With a recent change in web client, the point of sale could not load
anymore, because the web_client code tried to call this.menu.reflow(),
but point of sale overrided the show_application, and this.menu is not
even instantiated.

Since the point of sale actually want a barebone web client, instead of
using the full web client, removing some of its features, and then
fixing the problems each time a change in web_client breaks it, this commit
ensure that the point of sale is started with just what it needs
2016-04-27 15:52:04 +02:00
Yannick Tivisse b0cfcfaf30 [IMP] web: Shortcuts easier to use (lowercase)
By putting the shortcuts lowercase, it is easier to remember and to user.

Instead of Alt + Shift + letter, we have Alt + letter for Windows and Linus users
Instead of Control + Alt + Shift + letter, we have Control + Alt + letter for mac users

The combinations Alt + d and Alt + e are reserved to the browsers, so other letters are chosen
for these actions
2016-04-27 14:14:54 +02:00
Yannick Tivisse f321466a69 [ADD] web: Library to make fuzzy searches
https://github.com/mattyork/fuzzy
2016-04-27 14:14:54 +02:00
Aaron Bohy 0c261c91e1 [REF] web: base.xml: remove unused template
Also clean the 'UserMenu.about' template (remove unnecessary classnames), and
fix version name.
2016-04-27 11:51:40 +02:00
Jeremy Kersten 93e0980035 [IMP] openerp: tools - merge --debug mode in --dev mode
- Merge debug mode in dev mode.
- Allow to select dev feature ony by one

--dev=all will active all dev tool
--dev=
      xml        will read template in xml file and not in db
                 if not updated meanwhile
      reload     Add a watcher to reload the server if python code is modified
      qweb       Allow to add t-debug in template qweb
      werkzeug   Active the werkeug debugger console when an exception is raised
      (i)p(u)db  Allow to break before that the error is raised (old --debug mode)

To NEVER uses in production, since it give a console access in frontend.
2016-04-27 10:28:49 +02:00
Joren Van Onder 2e4b82f463 [FIX] point_of_sale: get rid of state on pos.config view
2dcbdd0778 forward-ported
534ff9dd8c from 9. In master however I
have recently decided (bbaf956328) to
remove this field and use the standard active field instead.
2016-04-27 09:44:31 +02:00
Jeremy Kersten bcba4efd91 [ADD] doc: add doc about dev mode
Remove the debug mode that has been merged into `--dev pdb`
2016-04-27 09:38:35 +02:00
Aaron Bohy 21462f4141 [FIX] web: view's do_execute_action with multiple input ids
Commit of xmo that has been lost by the unduplication of webclients (6768bbfc).
2016-04-26 16:34:47 +02:00
qdp-odoo d99c68ff39 [REF] account: refactoring of aged partner balance report in order to have that query reusable for the enterprise report 2016-04-26 15:01:42 +02:00
Christophe Simonis ed1109d97f [FIX] sale: use fields new api for converting onchange values 2016-04-25 16:40:56 +02:00
Joren Van Onder 62a8def918 [IMP] point_of_sale: wrap long product names on ESC/POS receipt
Lines have to be wrapped manually as nor the ESC/POS protocol, nor the
hw_escpos module will do it for us. Before this long product names where
truncated to 24 characters by hw_escpos.

This wraps the product names using available spaces in the product
name. A product name with > 24 continuous characters will still be
truncated.
2016-04-25 16:07:59 +02:00
Joren Van Onder 467ba386f4 [IMP] point_of_sale: get rid of unused arguments to XmlReceipt template 2016-04-25 16:07:59 +02:00
Christophe Simonis 2dcbdd0778 [MERGE] forward port of branch saas-10 up to bb8f0f1 2016-04-25 15:48:31 +02:00
Christophe Simonis bb8f0f1fc3 [MERGE] forward port of branch saas-9 up to 4d337f7 2016-04-25 14:43:44 +02:00
Raphael Collet f5f7df9df2 [MERGE] orm: implement new model for the prefetching of records
The new model is now the following:
 - each recordset is attached to a prefetch object: records._prefetch
 - the prefetch object associates model names to record ids to prefetch:
   ids = records._prefetch[model_name]
 - a call to model.browse(ids) returns a recordset with a new prefetch object
 - the prefetch object is passed and populated by
    - iteration
    - access of relational field
    - with_env(), sudo(), with_context()
2016-04-25 13:38:27 +02:00
Raphael Collet b684f0b521 [IMP] doc: add some basic description of record prefetching 2016-04-25 13:37:12 +02:00
Raphael Collet 7a8a8097f6 [IMP] fields: change the cache format of relational fields
Relational fields are now cached as tuples of ids instead of recordsets.
2016-04-25 13:37:12 +02:00
Raphael Collet 318fc6f4b1 [FIX] check values passed to update 2016-04-25 13:37:12 +02:00
Raphael Collet 84cf3ceb44 [FIX] base_action_rule, mail, membership, point_of_sale: do not mix cache format with record format 2016-04-25 13:37:11 +02:00
Raphael Collet 1ec7b28a09 [FIX] models, fields, api: do not mix the cache format with the record format 2016-04-25 13:37:11 +02:00
Raphael Collet d035828778 [FIX] models, fields: make read add secondary records for prefetching
Make the following statements add secondary records (values of relational fields)
in the prefetching object of ``self``:

    self.read(fields)
    self.partner_id             # implicitly invokes read()

This makes sure that traversing relational fields on records automatically
feeds the prefetching of secondary records.
2016-04-25 13:37:11 +02:00
Raphael Collet f9b08f09b2 [IMP] models: make with_env, sudo, with_context preserve the prefetch object 2016-04-25 13:37:11 +02:00
Raphael Collet 8bc7d8565c [IMP] models: attach prefetching data to recordsets instead of environments
The prefetching now has a more intuitive and controllable model: every
recordset is linked to a "prefetch object" that tells which record ids to
prefetch for any model.  The prefetch object of a given recordset is shared
with the records obtained by iteration and relational field access.  All other
operations instantiate recordsets with a fresh prefetch object.

    records = model.browse(ids)
    assert records._prefetch is not model._prefetch

    for record in records:
        assert record._prefetch is records._prefetch
        assert record.relation._prefetch is record._prefetch
2016-04-25 13:37:11 +02:00
Raphael Collet 6037f3a56d [REF] fields: change API and semantics of converter methods
The cache data format has been split between a cache format and a record format
(returned by accessing a field on a record).  We have the following converters:

                                   ANY FORMAT
                                       |
                                       | convert_to_cache
                                       v
                                  CACHE FORMAT
                                       |
                                       | convert_to_record
                                       v
                                 RECORD FORMAT
                                       |
                                       | convert_to_read
                                       | convert_to_write
                                       | convert_to_onchange
                                       | convert_to_export
                                       | convert_to_display_name
                                       v
                                 OTHER FORMATS

Modify the API of the converter methods to make them uniform (pass value and
record), and adapt their documentation.
2016-04-25 13:37:11 +02:00
Raphael Collet cb8d432bb2 [IMP] fields: do not validate values when not necessary 2016-04-25 13:37:10 +02:00
Raphael Collet d3cfb47285 [IMP] fields: simple code improvements (add blank lines, remove unused imports) 2016-04-25 13:37:10 +02:00
Christophe Simonis 4d337f72ed [MERGE] forward port of branch 9.0 up to ac7beb3 2016-04-25 13:33:01 +02:00
Christophe Simonis ac7beb3d7b [FIX] test_new_api: adapt test to new x2many commands return by onchange 2016-04-25 13:08:03 +02:00
Christophe Simonis ac16454965 [MERGE] forward port of branch saas-6 up to ba34df1 2016-04-25 12:40:13 +02:00