The billed quantity field on the purchase order line
must exclude the cancelled invoice, as a cancelled invoice
is not considered as invoiced.
`draft` could be considered as well, but we do not
take the chance now, as this field is used
when creating a new invoice, to determine the
quantity to invoice. Therefore, if there are
draft invoices with some quantities invoiced,
it can make sense to reduce the quantity
in this new invoice. Nevertheless, it must not be the case
for cancelled invoices.
opw-679363
This branch need more testing instead of doing 10 fixes. A lot of issues are occuring
when installing modules in different orders.
This reverts commit fa6e415cdb.
When both selected, these filters are expected
to display Invoices - OR - Refunds.
It was not the case, because the web client
expects to receive the domains normalized
when concatenating domains together with a
`|` statement.
Selecting both filters resulted in the below domain:
```
[
'|',
('state','in',['open','paid']),
('type','in',('out_invoice','in_invoice'))`,
('state','in',['open','paid']),
('type','in',('out_refund','in_refund')),
]
```
Instead of
```
[
'|',
'&', ('state','in',['open','paid']), ('type','in',('out_invoice','in_invoice'))`,
'&', ('state','in',['open','paid']), ('type','in',('out_refund','in_refund')),
]
```
opw-679246
Purpose:
Having the res_group defined in base and sales_team auto installed
with mail doens't make sense.
- Move the empty res_config class and the related view from
base_setup to sales_team (base_setup only contains the 'General Settings'
model and views
- Move the 'sale' related content from product to sale module (Access rights,
menuitems,...)
- Set sales_team at autoinstall False. The module is installed when needed by
crm or sale for example
- Set sales_team as a dependency of voip. (Access rights defined for configuration
purpose)
- Set sales_team ad a dependency of subscription (Access rights issue too)
Rename xmlids accordingly. Example: 'base.group_sale_manager' becomes
sales_team.group_sale_manager.
The test `test_balanced_exchanges_gain_loss`
failed on Jun 6, because it created a specific rate
for today's date at midnight
(e.g. on Jun 6, 201x-06-06 00:00:00) for the test purpose,
but a rate is created in the demo data for Jun 6 midnight exactly:
`base.rateUSDbis`, making the test confused about which rate
to use.
We solve this by making the test use the rate `base.rateUSDbis`,
modifying the rate for its own need, instead of creating a new
rate.
=======
Purpose
=======
For now all the views of blog posts sort them based on creation date. This creation date cannot be
changed (even with server actions). This leads to issues in several cases:
- import of old blog posts from a former system -> all the blog posts have the same date, on the website as well
- website visitors see when the blog post has been created, not published...
=============
Functional Spec
=============
Display blog post sorted by publish date in descending order. If the post has not been published yet,
the published date = creation date. When a post is unpublished and then published again, the publish
date should be updated to the last time it is published.
Add a status filter for published/not published blog posts, by default both are active (only visible
for website admin)
Avoid the DOCTYPE tranlation. If this tag is changed, the html rendering is altered. The other effet is that the web_editor wrap the content with <span> to translate, but some explorer eject tags (doctype, head content, script, style, meta) et insert this tags in the body.
NB: DOCTYPE is not a node but a text.
The sub-select used to fetch companies rates
was wrong in the case rates with no company set
were entered before rates for specific companies.
e.g., for USD, the below rates:
Date Rate Company
2016-02-13 0.721400
2016-02-25 0.738800 1
2016-02-26 0.740000 1
the sub-select returned
Rate Start End
0.721400 2016-02-13
0.738800 2016-02-25 2016-02-26
0.740000 2016-02-26
while it was expected to return
Rate Start End
0.721400 2016-02-13 2016-02-25
0.738800 2016-02-25 2016-02-26
0.740000 2016-02-26
as the rate 0.721400 ended on 2016-02-25,
since a new rate specific to this company 1 was
added at that date.
opw-678726
This revision is similar to edc4b0b9bb
Since revision 7f8fe10766
the route `/web/webclient/qweb` must allow cross origin
so this route can be called from HTTP pages
e.g. To allow a HTTP loaded point of sale to call this route in
HTTPS
opw-679288
======
purpose
======
- Allow user directly see the Answers of the Survey from Survey Form view.
- Allow user to Delete all the test answers from Survey Card.
==========
specification
==========
- Add a stat button called "Answers" in the form view of survey with the counter = number of people who have filled it up.
It shows the backend answers because the action button "view results" will show the front end report.
When clicking on it, a group-by Partner will be set.
- On the survey form, add "Clean test answers" in the action menu
Module sales_team was auto installed if base and mail was installed, but
this isn't wanted as it is already a depends of crm and sale modules
which should be anyway installed for sales team to have a meaning.
This could lead to a glitch with the sale apps displayed whilst it
should not be.
opw-679223
The action object, and in particular its context, is modified by the Action
Manager and by some views (e.g. sales_team_dashboard Kanban). So, as the action
is stored in cache, the same object was returned each time the action was
requested, and previous modifications of its context still applied.
This produced a bug with the sales_team_dashboard when following those steps:
- click on the link to today's activities, it opens an action with
'search_default_today' in the context,
- come back to the dashboard
- click on the link to this week's activities, it opens an action with
'search_default_this_week' in the context, but the formerly added key
'search_default_today' is still there as well, so the domain is wrong.
Context:
Source document on invoice created through a credit note with the modify option
Current issue:
create an invoice from a sale order,
validate it,
Create a refund with the modify option
The first invoice is reconciled with the refund
The new draft invoice doesn't have a source document and can't be reached from the SO
Expect result:
The new draft invoice should have the sale order as the source document
1/ On create new record focus field should select already existing value of field,
So user doesn't have to remove the old value first and then enter new value.
2/ Forget about it
This reverts commit c43a97f353.
If you use a setTimeout in your js code, you might want to have a
serious look at what you are doing. You are almost certainly doing it
wrong.
If you chain a deferred with the number returned from a setTimeout, you
definitely don't know what you are doing.
If you try to fix editable list view by magically adding timeout,
potentially inversing the order of execution, and without understanding
how deferred works, it is clear that you are just changing stuff until
your particular bug disappear in your particular case, and that you have
no idea what other bugs you just introduced.
Please study how deferred works, how the basic JS methods works, learn
what setTimeout returns. Also, you might want to have a basic
understanding of how and when expressions are evaluated. For example,
if you cannot explain why a if statement cannot be replaced by a
function, you might want to stop what you are doing and educate yourself.
Rev. 93e9a4dce7 tried to speed up
the 9.0 name_get() of res.partner by only calling fields_get()
once for the whole name_get, instead of calling it lazily.
This may have worked for name_get calls on multiple unnamed
addresses (name is NULL), but this is a rare occurrence
in practice - while now every single name_get() call would
incur the full cost of the fields_get() call.
That fields_get() call is O(n) in the number of fields,
and there can be quite a few for res.partner.
Calling it only for the specific 'type' field can easily be
about 40x faster than without it.
And since name_get() is called for each Many2One field
of each record being read (due to convert_to_read()), reading
a batch of records with partner fields had become quite
a bit slower!
Avoiding this cost entirely with lazy fields_get() calls
saves quite a lot of time for the common cases. And now
that fields_get() specifies a single field, it is cheap
enough to be called within the loop.
Non-scientific benchmark: account.invoice.search_read() in
the list view of invoices took 500ms for 25 invoices
_before_ this fix, and 90ms after!