[IMP] account: partner form view: add a small link under the bank accounts list, allowing to open the tree view of the linked res.partner.bank, so that they can be fully edited
Before that, as the bank_ids field of res.partner is displayed as an editable tree view with only two columns, it was impossible to edit more specific fields of the bank accounts through the partner form view, such as acc_holder_name.
When cropping the image with a size, we crop it first and then we make a thumbnail out of it
Before this commit, the same byte stream was used, meaning that the thumbnail was
appended to the original
After this commit, we reset the stream
OPW 1876496
closes#26575
Since 2f7c03d9ca it's not possible to log in as user 1.
However, we reset the base url when the admin logs in, which is now user 2.
This fixes wkhtml2pdf was not able to load css file, and probably some other side effects.
PR: none
Task: 1879620
Purpose
=======
Currently, as the admin as no email address, it's now impossible to install
the mail module without demo data, because of the following data:
<record model="mail.message" id="module_install_notification" context="{'mail_notify_noemail': True}">
<field name="model">mail.channel</field>
<field name="res_id" ref="mail.channel_all_employees"/>
<field name="message_type">email</field>
<field name="subtype_id" ref="mail.mt_comment"/>
<field name="subject">Welcome to Odoo!</field>
<field name="body"><![CDATA[<p>Welcome to the #general channel.</p>
<p>This channel is accessible to all users to <b>easily share company information</b>.</p>]]></field>
</record>
Because when creating a mail.message a user error is raised if no email address is found.
@api.model
def _get_default_from(self):
if self.env.user.email:
return formataddr((self.env.user.name, self.env.user.email))
raise UserError(_("Unable to post message, please configure the sender's email address."))
In a general way, all the users should have an email address.
Purpose
=======
Currently, as the admin as no email address, it's now impossible to install
the mail module without demo data, because of the following data:
<record model="mail.message" id="module_install_notification" context="{'mail_notify_noemail': True}">
<field name="model">mail.channel</field>
<field name="res_id" ref="mail.channel_all_employees"/>
<field name="message_type">email</field>
<field name="subtype_id" ref="mail.mt_comment"/>
<field name="subject">Welcome to Odoo!</field>
<field name="body"><![CDATA[<p>Welcome to the #general channel.</p>
<p>This channel is accessible to all users to <b>easily share company information</b>.</p>]]></field>
</record>
Because when creating a mail.message a user error is raised if no email address is found.
@api.model
def _get_default_from(self):
if self.env.user.email:
return formataddr((self.env.user.name, self.env.user.email))
raise UserError(_("Unable to post message, please configure the sender's email address."))
In a general way, all the users should have an email address.
When using another login method than stored password (ldpa,i oauth...),
user's password is NULL in database. Passlib < 1.7 expect the encrypted
password to be a string, leading to an uncaught traceback, forbidding
login.
During rebase of 4f6ec1c, we remove accidently a part of aac21e4.
Side effect is that uid was False but success_login True.
Courtesy of @xmo-odoo for help
- When accessing an image from an "ir.attachment" which doesn't have an
access_token, the code crashes if you provide the argument access_token
on the URL.
This is due to a comparison between a boolean and a string using the
consteq function.
Before starting a JS test/tour the _wait_ready method evaluates if the
test is ready with a timeout of 10 sec. From times to times, it happens
that the page is not ready after this timeout but the problem is hidden.
In order to help fixing that kind of issue, the timeout is increased to
60 sec and a warning is logged to emphasis the fact that an
issue exists.
Also some unused imports are removed with this commit
Before this commit, if import from tests directory was not in the __init__ file,
it was not possible to launch it with --test-file cli.
Now we only check in test directory if file exists.
This commit closes#26500
-remove margin
With the spirit of making tests determinists,
we can remove margins to have a real test of query count.
-mock random on assert query count
bus gc is triggered using random. Therefore, when send_many is called,
we have 1% chance to have more query. Mocking random.random to 1
will disable gc during query count tests (not during warmup).
Could be interresting to put gc collection in a cron latter
-add more info on querycount
Adding file and line number on query count failure/info will help to update
the query counts.
-update query count based on enterprise
Update all query count with enterprise values (exactly)
-normalize query counts with enterprise
voip module add a read on activity type (during create) in enterprise,
leading to one more query but also more information in cache.
Therefore, the next assertion will need one more query to access this data
in community.
Adding an access to activity type in the first assertion will allow
to have the same cache state in community and enterprise.
Task: #1878588
PR: #26476
On a new DB with demo data, as Demo User:
- Create a partner
- Unlink the partner
An `AccessError` is raised.
The error is raised on `ir.property`, for the field
`property_product_pricelist`. An entry was indeed automatically created
at partner creation. However, a regular user is not allowed to delete an
`ir.property`.
The property can be safely deleted as SUPERUSER as long as the proper
unlink access rights have been tested beforehand.
opw-1870737
With BS3, if a column was supposed to be aligned on the right, using
the 'pull-right' class on it did the trick.
With BS4, this is not the case anymore as .row elements use flex.
This commit use one of those 3 solutions case per case:
- If the column was alone on its row, then adding the
'justify-content-end' class on the row.
- If the column was not alone on its row, then adding the 'ml-auto'
class on the column instead.
- If the column was already filling the row, there was no point in
aligning it to the right
Note: this commit does not case about potential xpath which would add
new columns in one of those rows. If any, this can be handled as a fix
later.
Currently, to remove link of x2m field from any record, sometimes there's no way.
For example, if we are on mobile and open any Quotation, it's linked quotation lines
are automatically converted in kanban, and there is no way to delete a line from
that quotation. However, in some of the manually designed kanban, there is special 'x'
for removing / unlinking x2m record, for example, Contacts of Partner.
This commit makes the behavior more consistent. During edition (mobile and desktop), if
a view dialog is opened on click of x2m field, it will have one 'Remove' button (based
on user rights) on right side of dialog footer, allowing users to delete / unlink the
record. Moreover, in mobile, the modal is opened fullscreen, with sticky header and
footer.
Related Task# : 31641
Closes PR #15857
Co-authored-by: Mohammed Shekha <msh@openerp.com>
Factur-x is the e-invoicing standard in vigor in FR & DE and, by extension, it will probably become the standard in Europe. Thus this will be used as default e-invoicing standard by Odoo.
The idea is simple:
* when printing your customer invoice report (not in draft ofc), a Factur-x xml file is generated and embedded inside the PDF.
* when importing supplier bills in the form of PDF files, we detect if any Factur-x xml file is attached and complete the data of the draft vendor bill accordingly. This is done during the message_post() function.
/!\ To be compliant with the Factur-x standard, the PDF should be PDF/A-3b compliant. (See: http://fnfe-mpe.org/wp-content/uploads/2018/07/1.-FACTUR-X-V1.1-2018-07-24-FR.pdf chapter 6)
However, wkhtmltopdf is not PDF/A compliant and then, the generated PDF report are not fully compliant with the Factur-x standard.
Was task: 1859277
Was PR #25508
When a Chrome headless test fails the browser is not cleaned and could
lead to a mix with other tests when the same method is called.
Also, the multiline assertions gives an unreadable message when the
assertion fails.
Finally, it happens that a thread does not have an 'url' attribute and lead to a crash when the logger tries to show the thread url.
With this commit, the browser is cleaned, even on failure and the
assertions are now one line.
Closes: #26432