Unable to differentiate between note and message in Odoo 12 - notifications

When I log any note (after clicking log note link) inside sale-> quotations or CRM -> activity
After entering any note when I check in notification section is doesn't show 'Note By ...' label in Odoo 12, in Odoo 11 it works fine.
I debugged the code and found that there is problem in the base module
mail->static->src->js->models->messages->abstract_message.js -> isNote()
function is returning NULL!
Please tell me is it a bug or how to differentiate between message and note.
Thank you!
Screen Shot - 1(Odoo 12)
Screen Shot - 2 (Odoo 11)

You can differentiate notes from messages by the background color of the notification:
To distinguish a note in code, you have to use the internal field of the message's subtype_id:
is_note = message.subtype_id.internal

Related

How display notifications on product page [PRESTASHOP 1.7]

How display notifications like these on screen on product page ?
I tried use:
$this->context->controller->errors[] = $this->l('Some message');
But i cant display this errors on the screen
If you are working with product page you may modify ProductController.
You can make a test writing
$this->errors[] = 'testing';
before return.
There are 3 types of notifications avaliable for you in front office:
success - An action was performed and everything went well.
error - Something went wrong.
warning - Important notice the merchant should know about.
info - “just so you know”.
They are PHP arrays, and they hold messages as a string. In your example you should try putting something like this in your controller:
$this->success[] = $this->l('Information successfully updated.');
Source: link

How do you resolve 'Font was not found' error in visualWorks 8.1?

I have been using the report4pdf(bob nemec) package to generate reports as PDFs. Everything goes well except when I am trying to have some nice cell padding on the right.Thought an update would fix that.
So I connected to the public repository and updated the following:
Report4PDF 1.4.0.1
(comments said this was made to match with PDF Development 1.4.3.0 and Font Development 1.3.3.2. So updated those too).
However when I update and run the code it says,' Font not Found'.
Sure enough, when I run the debugger and 'inspect' on the self loadedFonts part from the debugger:
^self loadedFonts at: aSymbolOrFilenameString ifAbsent: [
FontNotFound raiseSignal: aSymbolOrFilenameString , ' was not found']
where: A symbolOrFilenameString= #'Helvetica-Bold'
As I opened the dictionary object, the font was there. Its just that the key didn't match. I am guessing the update changed all the keys except this one.
Anyway I hope you guys can help me out.
Thanks in Advance!
UPDATE 1:
Hi Bob! So I ran the ifNil block on the loadedFonts. But I hit a new error. It says: OrderedCollection(Collection)>>notFoundError.
So its trying to get something from
Graphic.Fonts.OpenType.CmapSubtable class>>classFor::`
The code being:
classFor: formatInteger
^self allSubclasses detect: [:sc | sc subclasses isEmpty and: [ sc formatNumber = formatInteger]]
=======
where formatInteger is 4.
Font class>>loadedFonts changed in the latest 'Fonts Basics' package, and Report4PDF was changed to use the new names. However, the LoadedFonts class variable in Graphics.Fonts.Font is initialized on the first reference. To get the new list, after loading the latest code, you need to run the ifNil: [] block in Font class>>loadedFonts.
In my image, with the latest code loaded, #'Helvetica-Bold' is defined in LoadedFonts.

AppleScript not getting URL or webpage title in Safari

I am trying to do the following in Safari: I have a website opened (let's say http://www.example.org) and I'm trying to get the current tab by using applescript.
I tried the following:
delay 1
tell application "Safari"
set mytitle to name of current tab in window 1
end tell
display alert mytitle
However I get the following error message
Safari got an error: AppleEvent handler failed.
I tried with all sorts of variations, URL of current tab in window 1, name of current tab, with and without window 1...
But the error persists.
After a bit of consoling it came up with this error:
Console returns this: Error while returning the result of a script command: the result object... lol - Buscar con Google ...could not be converted to an Apple event descriptor of type 'text'. This instance of the class '__NSCFString' returned nil when sent -objectSpecifier (is it not overridden?) and there is no coercible type declared for the scripting class 'text'.
What am I doing wrong?
I'd appreciate any ideas.
Thanks.
Try:
tell application "Safari"
set mytitle to name of current tab in window 1
end tell
return mytitle
The first script I posted did indeed work... There was a systemwide error and clean install fixed it. Not sure what was going on. Thanks everyone.

Prestashop admin panel is lost after trying to export language packet

There were some language problems in my site which uses a specific theme so I thought,I should pick out the language pack edit and reload it. Because I couldn't find a way to edit it using browser on admin panel.
I just pressed a button named export language packet. I don't know if something happened that time. But it didn't give me a file (an exported file I mean) . So I didn't do anything else. But since that time I can't reach my admin panel. While I write the URL it shows me a big white screen.
On the other side the site itself (not admin panel) is reachable. What can I do to fix my problem?
Hi,
This is the error
( ! ) SCREAM: Error suppression ignored for
( ! ) Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting ']' in C:\wamp\www\httpdocs\translations\tr\admin.php on line 586
Call Stack
# Time Memory Function Location
1 0.0009 690552 {main}( ) ..\index.php:0
2 1.7995 9942280 DispatcherCore->dispatch( ) ..\index.php:50
3 2.0567 10375504 ControllerCore::getController( ) ..\Dispatcher.php:342
4 2.0686 12512728 AdminControllerCore->__construct( ) ..\Controller.php:128
5 2.0689 12514200 AdminControllerCore->l( ) ..\AdminController.php:304
6 2.0711 12612344 TranslateCore::getAdminTranslation( ) ..\AdminController.php:1737
The error you got is in your translation file in file translations\tr\admin.php on line number 586.
To fix that error, take a backup of that file, i.e. keep a copy of that file in some other place, then try to find out the syntax error you got there. It is some kind of PHP syntax error there in that translation file. As the translation file is only for the admin section, therefore your site front end may be fine and your site admin section is not working.
If you are not able to find that error and fix it, then delete all contents from that file, and then try to load the admin section.
You should use a translation pack which is provided by prestashop, ie download it from the prestashop http://www.prestashop.com/en/translations .
Also if you want to edit translations, use admin. In your question you mentioned, that you were not able to edit translations, please do provide details for that problem, and also try to edit translations while keeping error reporting on, so if there is any problem, you will get the errors printed. If you got errors printed, then update your question with that error message.
Let me know if you still got any questions.

Like Box - Blogger Error

I'm tring to put facebook Like Box to my blog but after I put Javascript SDK (right after opening body it show me error
**
The reference to entity "appId" must end with the ';' delimiter.
**
and I cant fix it ... :(
What I need to do/edit ???
I had the same problem: fbml=1 appId where I just deleted & and put the closing script right after Load the SDK line. I checked it with the debugger and now there are no errors.
I'm not asking for other permissions, just the "like my page."
{edit. had to change to closing script as the brackets and script didn't show.
Yes, Change the &appId to &appId ant it will work.