When processing a payment transaction, double-check the
match between the amount of the transaction and the
amount of the SO, to be sure that we won't be validating
a SO that has been modified since the payment.
Such cases have to be double-checked manually.
Also add a bit of extra logging to make auditing ecommerce
transactions easier.
In addition to being mostly useless because Paypal's API
changes are supposed to be backwards-compatible, this
warning was using inconsistent version numbers.
Switched to a simple INFO line with IPN version.
/!\ This commit must not be forward-ported on saas-10 (the file that
is modified here does not exist anymore anyway).
Since the website/web_editor split, the mt/mb definitions were not
included in reports anymore. Those were not the only rules that
were forgotten.
As it would be tricky to add the whole files where those rules are
defined now in the assets of stables branches, this commit only
restores the missing css rules by adding them in the report.css file.
Note: after the assets refactoring that has been done in saas-10, this
problem will no longer appear.
The introduction of the new pos.config dashboard at
48ab50ed0d does not filter non-active
pos.configs. There are no constraints against opening sessions on
inactive or deprecated pos.configs so after deprecating/inactivating
users could still open new sessions through the dashboard.
opw-673020
When a lead is set to 'Won', the date_closed is defined. However, the
user might have clicked by mistake, and he might want to change the
state back. We need to take this into account, otherwise the lead is
considered as closed although it is not.
opw-674226
The POS generates journal entries for both the amount of money the
customer pays and the amount of money the POS user returns to the
customer (the 'change'). Whether or not this is the correct thing to do
is up for debate, but we can't change that in stable anyway.
One of the main issues is that in 9.0 accounting will propose
unreconciled payments belonging to the customer on open, unpaid
invoices. This does not work well with the account entries generated by
the POS. Accounting will propose the amount the customer paid, without
taking into account the change.
Example: a customer buys $7 worth of products and pays with a $10
bill. The customer gets $3 change. The invoice will propose the $10
payment.
When you add that payment to the invoice a residual amount ($3 in the
example) will remain on the paymentline, complicating everything even
more.
Although we cannot change how the POS does accounting in a stable
release, we at least want people to be able to easily handle invoices
generated through the POS. To achieve that this patch will make the
backend match the payment to the total amount of the invoice removing
any potential change.
opw-671486
From 94ed4ce8c8
The original issue is the following:
- Go to the journal item creation
- Choose a partner
- Add a line => the partner on the journal item is removed
This is because `partner_id` on the account move is a related to
`partner_id` on the account move lines. This is likely to cause errors
during the manual encoding of a journal item, since the relation will
link the partner of the account move to the partner of the first account
move line only.
opw:672354
For some reason this made it into a stable release. Although you can set
a background image on a floor this image never actually got displayed on
the floor in the POS. Only the background_color field is respected.
Something like this is always a bit tricky, because you would either
have to scale the image to fit on the floor (ugly if the user uploads a
low-res image or an image with the wrong aspect ratio), or you would
have to tile the image (also ugly in most cases).
Because of the above and because this has never worked and because I
don't consider it a particularly useful feature we will remove it
completely in master.
opw-674031
Current behavior before PR: if you create a new record within a one2many
field and the model's form has a clickable status bar defined, clicking
this status bar will raise an exception because the virtual id
(one2many_v_XXXX) will be passed to the model's write method
Desired behavior after PR is merged: clicking just changes the cached
value
Related and function manual fields may not be loadable during initial
setup (partial=True) due to dependencies being not loaded. Ignore
theses fields during partial loading.
Users may sometimes need to edit their own partner records directly,
although indirect access by writing on `res.users` directly works
fine in most cases.
The SQL view `crm_partner_report_assign`
makes a join on `account_invoice_report`
A column is added to
`account_invoice_report` in the module
`sale` (`section_id` is added to the view),
making the SQL view `account_invoice_report`
replaced automatically at the install/update
of the `sale` module, which leads
to the automatic deletion of the SQL
view `crm_partner_report_assign`,
because the SQL view `account_invoice_report` is
altered.
Therefore, after the install/update of the `sale`
module, the view `crm_partner_report_assign` was
deleted, and the "partnership anaylsis" unusable.
This revision makes sure to init the
`crm.partner.report.assign` report after
every init of the `account.invoice.report`.
opw-674177
For some reason, it was lost. Probably in the graph view/pivot view split.
This commit simply accepts the attribute, but default to true, so nothing
changes unless you have explicitely set it to false.
Also, fixes en error introduced by a forward port (the use of
openerp.web.format_value)
Following commit 5b380e13, the the taxes on the fees are not calculated
correctly. Moreover, setting the subtotal in the onchange is misleading
since it will be set to zero if the line is not invoiced. We just set
the price to zero by default, and the click on 'update' will set it
correctly afterwards.
opw-673984
This solved two issues. First, the price subtotal should contain the
price with taxes excluded, as it is the case in other modules.
Otherwise, the tax will be computed twice. Then, when an invoice is
generated, the taxes should be calculated...
This is an oversight of commit fe2b5f35a4.
opw-673984
The do_search method still had a race condition because the
read_slice method of datasets alter ids. So, what could happen is
this: a long search is started, then a shorter search is started and
ended before the first search is completed. The ui is rendered
properly, but then the long search ends and alter the dataset. As
a result, the Kanban view is broken (cannot open a record anymore
because the dataset has the wrong ids).
This commit fixes the issue by doing basically what the read_slice
method did, except the ids altering part. However, it introduced
a new problem for x2many kanban views: these kanban view don't have
the same dataset, they have a datasetstatic. The naive substitution
does not work, so I had to reintroduce the old method in X2ManyKanbanView.
The two fields used in the filter are not available on the
crm.activity.report model.
It is not possible to do a Lost filter until the fields are added (and
this can only be done in master).
opw-673533
note: should not be forward-ported over saas-10
request.website.get_languages returns a list of tuple in the form:
(`language code`, `language name`)
With this commit the code first check if there is a language exactly
matching, and only if failed check if there is a match on the short
form.
closes#11613
opw-672412
When adding a product to the cart via _website_product_id_change, some
information are set in the context to mimic `product_id_change` from sale.
In the context of a sale.order redacted in backend, using the language of the
`partner_id` makes sense as the quotation should be in the language of the
customer and not the user writing it.
In the ecommerce scenario, this is not the case. The language is set in the URL
and can be passed as an argument.
Scenario to fix:
Add a product to the cart when visiting the website in a different language.
The product name and description were in English (or language of public user if
different) instead of the language of the website when adding it to cart.