Problem: if we try to validate an invoice with a line with a discount of 100%,
this will create an aml with debit=credit=0 and reconciled flag as True.
So when trying to cancel invoice, it is not possible because the check tell us
that there is an entry which is reconciled and we can't unreconcile that entry,
so the check should just ignore line with debit-credit=0.
Also add readonly to general_account_id related field on account.analytic.line.
This is to prevent a write while creating the account_move_line in the case of an
invoice with analytic account.
When checking `Attach Google documents to any record`
in the general settings, if you are not redirected
to a module, but, instead, the current page is refreshed
(the wizard is reloaded instead of creating a new
configuration wizard),
the default value for `google_drive_uri` was not correctly
loaded, the `client_id` in the URL
remained `False` because the wizard was not being
re-created, but reloaded,
and therefore `default_get` hasn't been re-called,
and the `client_id` changed
(it was added to the system parameters after
the installation of the module)
Therefore, the link did not include the correct
`client_id`, and it leaded to the inabibility
to use the URL:
401. That’s an error.
The OAuth client was not found.
Replacing the simple char fields by a function
field, with the correct store trigger,
force the URL value to be reloaded
when the system parameter is inserted.
opw-673274
When a user tries to access one of his orders, the order is shown empty.
This is due to the domain which is applied as an "access check" attempt
and might filter out the order.
The fix directly checks the access rights of the user regarding the
sales order, and return a '403' code if necessary.
opw-671107
`get_formview_id` returns a view id to open
the document with. This method is meant to be
overridden in addons that want to give
specific view ids for example.
A link to an invoice must open a different form view
according if this is a customer or a vendor invoice.
This is handled by overriding `get_formview_id`
and returning the view id that should be used
according to something in the record
(e.g. according to the `type` field).
It was present in 8.0, it was somehow
removed in Odoo 9.0 during the refactoring
of the accounting modules, probably
for a wrong reason.
opw-673246
This revision is related to 9752aedb4e
It looks like in some cases, the user cannot read the
partner associated to his own cart.
This is the case when shopping without being signed in.
opw-673187
This issue happen for example on a full runbot when clicking with
shift + key pressed on a sale order not in an editable.
We can see that initial_data.rect is only defined in mousedown when the
click target is inside an editable block, hence it could lead to an
issue otherwise.
closes#11527
Before 9.0 web_editor separation in 8c55904, some style would make
inline button be visible over topbar.
This commit reintroduce that and also make the margin over the inline
editor content a little bigger (so the inline buttons on the top of a
content will cover a little less the topbar).
closes#11526
opw-671649
The amount displayed in the website(my account) for the invoices must be
the amount due and clicking on payment button let the customer paying
this amount.
opw:671234
The pricelist computation should not immediately
apply the currency rounding to computed prices,
to allow for unit prices with arbitrary precisions.
This way users can use a higher decimal precision
for "Product Price" than what is allowed for their
currency. This is useful e.g. to obtain exact
subtotals prices when combining small prices with
large quantities.
The resulting price will be rounded appropriately
when it gets stored to the destination field anyway.
The default image field is usally too large for use
as a speaker avatar.
The implementation of the field should have been
a simple "related" field too, instead of a custom
computed field.
Many users upload large images for their avatar
(multi-Mb files). This makes most forum pages
longer to load than necessary, and wastes bandwidth.
128x128 images (`image_medium` field) are sufficient
for displaying avatar pictures on posts and profiles.
When exporting text data in CSV format, values
beginning with '=', '+' or '-' will usually be
mistaken by spreadsheet applications as formulas
upon CSV import.
That will often cause the cell to display an
error message instead of the actual contents,
such as "#NAME?"
Prefixing them with a single quote makes them
pure text cells. The special single quote
character is usually hidden by the spreadsheet
in that case.
Numbers and other types of values are not affected.
Add `display_start` and `display_stop` to the fields
which are public even if the event is marked as private.
There is no reason it should be public,
especially if `start` and `stop` are. Besides,
this leads to issues in
`get_search_fields`, when doing:
```
sort_fields['sort_start'] = browse_event['display_start'].replace(' ', '').replace('-', '')
```
opw-672997
When the warning module is installed, `onchange_picking_type` is not
called anymore.
When the method `onchange_picking_type` was introduced, it was not taken
into account that the warning module would change the onchange property
on the `partner_id` field thanks to the method `onchange_partner_id`.
opw-672091
Fixes#11342
To format Week numbers in the pivot view, babel is used with format
`'W'w YYYY` in the current locale (eg: en_US) which will determine
print the week in the locale week numbering type.
This is inconsistant with the fullcalendar version (1.6.4) in Odoo until
at least version 9.0 where ISO is used by default. This behaviour has
been changed in more recent version of fullcalendar and is now in tune
with pivot view, but updating fullcalendar should be done in master.
This commit customize the week numbering on the old version of
fullcalendar getting the yearned result without updating fullcalendar.
This is only possible in saas-6 since momentjs is only present since
saas-6 and is required for this fix.
closes#11522
opw-653671
opw-668711
Commits 7b7f3fa and d6c88b8 filter out special periods from the account
balances. However, this filtering is not necessary anymore for a closed
fiscal year. The result is that the opening balance becomes wrong as
soon as the previous fiscal year is closed.
This commit fix this by computing the balance over all fiscal years.
Closes#11515
When there is at least one invoice already linked to the SO, the
default advance payment method must be 'Invoiceable lines (deduct down payments)'
opw:672911
Packaging doesn't include non-imported python file because
redhat. Oblivious, revision 8e81abfeb5
renamed .py.template files to .py thus breaking scaffolding from
packaged odoo.
Revert that specific change.
Fix#11050
Missing bit from #10374: because the _read_xls function is a generator
it is *entirely* lazy and Python doesn't execute *any* code when it's
initially called, which means the file is actually (tentatively) parsed
when the first line is requested which happens outside of
_read_file (and thus of the fallback mechanism implemented by #10374).
Fix by splitting _read_xls between the opening of the workbook (eager)
and the actual iteration (which remains lazy).
When having multiple aliases matching a record, take the first one coming
in the order instead of the last one. This way the defined order is effectively
taken into account.
When using the mailgateway, the responsible of the newly created lead / applicant /
issue is explicitely set to False since the original mailgateway commit in 2010.
However this conflicts with some custom behavior that tries to set the responsible
on the same objects. Notably in recruitment the responsible is set to be the
recruitment responsible set on the job, if any.
In this commit we replace the explicit set of user_id=False to using a
default_user_id=False in the context. This way the admin or mailgateway user
will not be responsible of every new records. And this enables custom behavior
to find a responsible.
Some image functionalities of the inline summernote would only take the
first of multiple editor into account when selecting the targeted image
of an image button action (image size, image padding, ...).
This commit select the appropriate editor given the current editable.
closes#11474
opw-668861
A user in base.group_erp_manager (Access Rights) but NOT in base.group_system
(Settings), will try to fetch the list of groups to generate selection fields
to represent groups selection.
As the method `_is_admin` only verifies the user belongs to group_erp_manager
and the model ir.module.category requires group_system for read access rights,
`fields_get` method tries to fetch the groups and fails with a security warning.
The user fields are fetched when a res.partner form is loaded as the field
user_ids (one2many) is present in the form view of partner in invisible.
opw-672435
Before this revision, it was possible to use the
`/website/image` controller using kwargs only
e.g.
`/website/image?field=datas&model=ir.attachment&id=718207`
After, it's no longer possible.
It was assumed `/website/image` without any argument
in the route itself (`<xmlid>`, `<field>`, ...)
could simply never be called,
but this is not the case.
We therefore restore it by retro-compability purposes.
We have to ensure that the invoices generated through the POS always
reuse whatever fiscal position is set on the pos.order. Both in the
front- and backend a user can change the fiscal position to be different
from what is set on the customer of the order.
opw-668155
In revision 15b8f35, we decided to 'let ACL and ir_rules
do their job', which is an excellent idea for portal
users but a catastrophe for employee users (since, with
ACLs and rules, they have access to an giganormous amount
of SO, invoices, etc.), which made the server timeout for
big databases.
This commits reintroduces a limitation of the search that
matches ir_rules for portal users but which should limit
the number of elements visible to employees.
The fixed price decimal precision must use the same precision
than the other price field referencing a product price,
as this field is expected to contain a product price.
opw-672877