Commit Graph
117975 Commits
Author SHA1 Message Date
Nicolas Martinelli 7f356d6653 [FIX] account: mark as reconciled
`last_time_entries_checked` is a commercial field, so bypassing the
write won't sync it.

Closes #19274
opw-770018
2017-09-12 18:27:33 +02:00
Cédric Snauwaert 09189fa809 [IMP] l10n_de: localization package improved
* CoA up to date
* Taxes up to date
* SKR03 installed by default but users can easily switch to SKR04 while no accounting entries exists for the company
* removed unneeded things
* set tags accordingly on accounts and taxes for the reports to work (new reports in enterprise)

Was task 31826. Was PR #17447. Discussion related on #18571
2017-09-12 17:52:47 +02:00
Raphael Collet ed9e3ed699 [IMP] test_performance: run tests as demo user as well 2017-09-12 17:16:24 +02:00
Raphael Collet ee14025c52 [REF] test_performance: improve cache warmup in test methods 2017-09-12 17:16:24 +02:00
Nicolas Martinelli 6318ff6675 [FIX] account_voucher: default currency
- Go to Accounting > Configuration > Journals.
- In the form view of a journal, click on Action > Voucher Entries
- Click on Create => traceback

opw-771415
2017-09-12 17:11:14 +02:00
amoyaux ecb394710f [FIX] sale_stock: partner not propagate to picking.
Since procurement refactoring in commit 0e4f3bb959
the partner was not propagate between sale order and picking.

It happens because the _run_move method uses the group's
partner on the picking but the partner was not set on the
group during its creation.

This commit add the shipping partner id of the order
in the create method and this partner is used later in the
picking/move create method.
2017-09-12 16:35:01 +02:00
Nicolas Martinelli 39964e6cf2 [FIX] account: mark as reconciled
- Create 2 companies:
- Company A and check VIES VAT Check
- Company B and do not check VIES VAT Check
- Set current company of admin to Company A and do not allow Company B
- Create a demo user on Company B and give him Adviser group in
  Accounting.
- Log in with the demo user.
- Create a Customer A as a company with:
  Country = Spain
  TIN = ES85847955H
- Create a contact on Customer A: "Contact Sample"
- Create a Customer invoice on "Contact Sample" partner
- Through the menu Accounting/Payments, create a new payment on "Contact
  Sample" partner with the total amount of the invoice.
- Open the menu Manual Payments and invoicing matching. The invoice and
  the payment should be proposed for reconciliation. Do CTRL+ENTER.

An error message appears: 'The VAT number [ES85847955H] for partner
[Contact Sample] either failed the VIES VAT validation check or did not
respect the expected format ESA12345674.'

This message should not appear as the current user is on Company B which
doesn't have the flag "VIES VAT Check" checked.

The issue comes from the `sudo` in `mark_as_reconciled`, which will lead
to `self.env.user` to be the admin in the VAT check, and therefore
`self.env.user.company_id` will be Company A.

Closes #19274
opw-770018
2017-09-12 16:24:26 +02:00
Martin Geubelle 917ba745ea [FIX] web, account: display partner in reconciliation
When selecting a partner in the reconciliation widget, using the SelectCreateDialog
(Search More), the partner wasn't correctly displayed.

This was due to a difference between the change format of the many2one ; when using
the dialog, only the `id` is sent (while the `id` and `display_name` are sent when
using the many2one dropdown).

These two behaviours are now standardized and both now send `id` and `display_name`.

It has the advantage of sparing some `name_get`s called by the model because the
`display_name` was missing.

This change implies some refactoring where the SelectCreateDialog was used.
2017-09-12 15:49:22 +02:00
Goffin Simon 94eb69907d [FIX] crm: columns and tables in upper cases
The module studio gives the abality to name columns or tables with
upper cases. So making the SQL case sensitive avoids problems with studio.

opw:770022
2017-09-12 15:37:47 +02:00
Joren Van Onder 261b45521c [IMP] stock: allow user to correct pickings
Introduces a lock/unlock mechanism on stock.picking. When a picking is
unlocked a user is allowed to:

- change initial demand when picking is not done
- change quantity done when picking is done
2017-09-12 15:23:10 +02:00
Nicolas Martinelli d20388ba1a [FIX] purchase: missing data in tax computation
- Create a purchase tax computed with Python code.
- The Python code must use an attribute of the product, e.g.
  `product.price`.
- Create a PO using the created purchase tax.

It crashes, because the product (as well as the partner) is not sent to
the `compute_all` method.

opw-770078
2017-09-12 12:25:34 +02:00
Christophe Simonis 961b7820de [🐍3] 🎉 2017-09-12 12:15:10 +02:00
Christophe Simonis c5f680200c [MERGE] forward port branch saas-17 up to d08b4407be 2017-09-12 12:09:11 +02:00
Nicolas Martinelli 7eb7e9fd6e [FIX] account_tax_python: empty code
If the user somewhat removes the 'Applicable Code' text, the call to
`safe_eval` will crash.

opw-769267
2017-09-12 12:01:57 +02:00
Wolfgang Taferner 236a24de96 [FIX] account: handling of text domains in _query_get
1df72cb01b added a stringification of
the domain parameter to handle situations where an actual
domain (list/tuple) is being provided rather than a string, however
this causes issues when the string input is text (unicode) containing
non-ascii data as in Python 2 `str()` will then raise a
UnicodeEncodeError.

Rather than stringify the input, bypass safe_eval when the input is
already a proper domain.

Closes #19367
2017-09-12 11:20:09 +02:00
Nicolas Martinelli 80ad2a370c [FIX] account_asset: deferred revenue account
- Associate a product with a "Deferred Revenue Type"
- Create a customer invoice and add the product => the account of the
  deferred revenue is used.
- Create a SO with the same product, and generate the invoice => the
  account of the deferred revenue is NOT used.

opw-769254
2017-09-12 11:06:12 +02:00
Simon Lejeune d08b4407be [REF] stock: _get_available_qty and tracked products
Suppose you have a product tracked by serial number. In your inventory,
you have two quants: -1 for serial1, +1 for serial2.

If you create a move for 1 product and try to run `action_assign`, it
didn't work before this patch because stock.move's
`_update_reserved_quantity` is guarded by a call to
an unstricted `_get_available_quantity` (unstricted meaning considering
all quants regardless of their lot_id/package_id/owner_id). This call
resulted in an available quantity of 0, thus the stock move could not be
reserved

To fix this issue, we patched `_get_available_quantity` so that it
rightly considers products of different lot_id as different products,
i.e. it returns an available quantity of +1 in the initial scenario. Of
course, we consider all quants of the same lot_id, i.e. if you have -1
for serial1 and +1 for serial2, the available quantity amounts to 0.

In another scenario, let's say we have only -1 serial1 in stock, if we
run `_get_available_quantity`, the method should return 0: nothing is
reservable. We continue this reasonment by returning 0 everytime the
available quantity is negative, tracked or not. This is probably what a
method named `_get_available_quantity` should have done since the
beginning.

There's only a single case where we need to know the quantity even if
it's negative: it's just after we move a quant to its destination
location. If this quant was tracked and resulted in a negative quant
(i.e. we moved something we didn't have), we try to compensate with an
untracked quant. In this special case, we do not want to ignore the
negative quants when calling `_get_available_quantity`.  That's why we
introduce a new argument to this method. We could have added a new method
`_get_quantity` for clarity sake.
2017-09-12 10:50:04 +02:00
Raphael Collet e7205b7992 [FIX] models: _in_cache_without may not return new ids 2017-09-12 09:36:30 +02:00
Pratima Gupta 984b87c378 [IMP] report_intrastat: move report menuitem
To Invoicing -> Reporting -> Management
2017-09-11 18:24:56 -07:00
Joren Van Onder bb8f7bf9c3 [IMP] stock: set default product_id for new lots
When creating them through the Serial/Lot Number stat button on the
product variant.
2017-09-11 18:18:41 -07:00
Pratima Gupta 011d6acbe9 [IMP] account_analytic_default: remove the stat button 'Analytic Rules' 2017-09-11 18:18:41 -07:00
Pratima Gupta 9dadb4c475 [IMP] stock: add tooltip to field show_reserved of stock.picking.type 2017-09-11 18:18:41 -07:00
Pratima Gupta 350f5d5878 [IMP] stock: add stat button for product lot 2017-09-11 18:18:41 -07:00
Pratima Gupta 06c4a707ee [IMP] stock: don't group_by location when clicking on Quantity On Hand 2017-09-11 18:18:35 -07:00
Pratima Gupta 0f7d2d7cf7 [IMP] stock_account: add valuation stat button for products 2017-09-11 11:32:21 -07:00
Pratima Gupta e20ab3637f [IMP] report_intrastat: move report menuitem
to Invoicing -> Reporting -> Business Intelligence
2017-09-11 11:32:21 -07:00
Pratima Gupta a686cbc6e1 [IMP] stock: rename stock_move_action 'Picking Moves' -> 'Stock Moves' 2017-09-11 11:31:45 -07:00
Pratima Gupta c903a29c54 [IMP] stock: take stock_move_line_action menuitem out of debug mode 2017-09-11 11:31:30 -07:00
Pratima Gupta 029e227167 [IMP] stock: improve string for action_view_stock_move_lines
'Inventory Moves' -> 'Product Moves'
2017-09-11 11:24:57 -07:00
Christophe Simonis 73bb71b80c [MERGE] forward port branch saas-16 up to 295a377e5d 2017-09-11 18:56:15 +02:00
Christophe Simonis 295a377e5d [IMP] web: add test to ensure nobody will commit again unwanted QUnit.only 2017-09-11 18:14:16 +02:00
Martin Geubelle 7a87484856 [FIX] web: remove QUnit.only occurence 2017-09-11 16:54:09 +02:00
fwi-odoo 68d1e6d8b1 [FIX] web: evaluate the view context for the subviews not inline
Before this commit, the xml attributes defined with 'context.get(key)' in the
subviews not inline were not evaluated correctly. This was caused
by the loss of the one context in the '_loadSubviews' method.

This commit fixes this issue and modifies the mockserver in order to be able
to use the parameter 'viewOptions.context'.
2017-09-11 16:41:58 +02:00
fwi-odoo 268e6d9530 [FIX] web: calendar: set event without time as all day
Before this commit, when an event had only a date, the event
was set to midnight.
This commit sets the event as all day event if the field used as start date
is only a date and not a datetime.
2017-09-11 16:41:40 +02:00
Cédric Pigeon 280d9986fd [FIX] prevent calling costful methods on empty recordset
Some methods are called on empty recordset causing lacking of performance.

opw:769720
2017-09-11 16:39:35 +02:00
Nicolas Martinelli 0327f3e467 [FIX] report: paper format
Make paper format mandatory on the company. If no paper format is
defined, the PDF created may have an unexpected format.

opw-770173
2017-09-11 15:46:53 +02:00
Christophe Simonis fdc4ef97c9 [FIX] core: only check table existance in public schema
This allow the use of tables defined in other schemas, like `domains`,
already defined in `information_schema`.

See #16651
2017-09-11 14:55:49 +02:00
Pierre Masereel 45d706a607 [FIX] stock: action_done on move without quantity done
When we validate stock move having move lines with quanity done equal to
'0', these move lines are unreserved and in MRP, it creates move lines
with product_qty = 0 and qty_done = 0 which is not wanted
2017-09-11 14:48:08 +02:00
Pierre Masereel f3b34fecad [FIX] mrp: production wizard
The production wizard raised a traceback when you were trying to consume
product tracked by lot without reservation.

To fix this issue and some potential others, we have removed the
move lines from the wizard and create produce lines that are used on
validation to create the move lines.

This also let us show the 'To Consume' quantity of a lot instead of the
reserved quantity which has no sense when there is no reservation.
2017-09-11 14:48:08 +02:00
Goffin Simon 2e292a21e6 [FIX] mrp: Singleton expected in action_unbuild
In some cases, the consumed quants can be more than one.
In this case the check for the lot must be done just on the first
consumed quant. Courtesy of @jco.

opw:748472
2017-09-11 14:47:14 +02:00
Christophe Simonis bd08d4f052 [MERGE] forward port branch saas-16 up to 3ac2a1106c 2017-09-11 14:02:19 +02:00
Nicolas Martinelli d23667262b [FIX] account: future payment
- Create a vendor bill
- Register a payment in the future (e.g. Bank payment)

On the dashboard, this payment in the future is taken into account,
while it shows a graph up to today. Moreover, when clicking on
"Difference", the report is opened at today's date.

opw-768155
2017-09-11 13:35:30 +02:00
Christophe Simonis 3ac2a1106c [MERGE] forward port branch saas-15 up to ec15765eec 2017-09-11 13:30:03 +02:00
Nicolas Martinelli 7d72a72905 [FIX] calendar, web_calendar: change date
- Change the date of an event through the form view
  => a mail is sent to the attendees.
- Change the date of an event thanks to the drag and drop of an event
  => the mail is not sent.

It is necessary to introduce a context key in the write call so we can
make the distinction between the write triggered from the drag and drop
and the write triggered by a recomputation of fields. Indeed, when the
form view is used to change the date, `write` is called several times.
We should avoid sending the same email each time.

opw-766295
2017-09-11 13:27:23 +02:00
Christophe Simonis ec15765eec [MERGE] forward port branch saas-14 up to 48f88992da 2017-09-11 12:35:49 +02:00
Rohan Patel 8c1f6a7cc6 [IMP] mail,*: replace emojis by unicode in chat messages
*im_livechat,rating.

Emojis are now encoded in unicode characters in messages. This
allows to copy/paste messages including emojis, ensures that
emojis are properly displayed in mail interfaces (at least those
that support unicode, e.g. GMAIL, counter-example: outlook), and
allows the user to directly use emojis of its smartphone in mobile.

This commit also adds several new emojis.

PR #11095
2017-09-11 12:20:49 +02:00
Julien Legros ecbfcb6dcf [FIX] sql_db: use pycompat string_types 2017-09-11 11:49:13 +02:00
Christophe Simonis 48f88992da [MERGE] forward port branch 10.0 up to 7d7e94c6ef 2017-09-11 11:45:44 +02:00
Aaron Bohy a58fb415fc [FIX] web: click on many2many tag with no color
Before this rev., a traceback was raised when the user clicked on a
many2many tag in a kanban view without color field.

For instance, it was the case in the kanban view opened by clicking
on the Lead/Opportunity section of the activities icon in the
systray.
2017-09-11 11:44:24 +02:00
Christophe Simonis 7d7e94c6ef [MERGE] forward port branch 9.0 up to 46e3e739c5 2017-09-11 11:37:46 +02:00