Conversation
This commit adds a simple bakend to facilitate inheritance
This commit adds the database name under the ribbon name, in the ribbon
|
Isn't the dbname already shown next to the legged in user (as long as you are in debug mode)? |
|
@dreispt Yes, indeed, in debug mode. But we would like to see it without enabling the debug mode. |
| if (strColor && validStrColour(strColor)) { | ||
| ribbon.css('color', strColor); | ||
| // Ribbon color | ||
| if (ribbon_data.color && validStrColour(ribbon_data.color)) { |
There was a problem hiding this comment.
@ThomasBinsfeld maybe an else here for a default color if something goes wrong?
There was a problem hiding this comment.
@zakiuu Hi. It's the behavior before my PR. If it's an issue, we should fix it in a separate PR.
| if (strBackgroundColor && validStrColour(strBackgroundColor)) { | ||
| ribbon.css('background-color', strBackgroundColor); | ||
| // Ribbon background color | ||
| if (ribbon_data.background_color && validStrColour(ribbon_data.background_color)) { |
| # Add the database name to the ribbon name | ||
| db_name = self.env.cr.dbname | ||
| name = u"{name}<br/>({db_name})".format( | ||
| name=ir_config_model.get_param('ribbon.name'), db_name=db_name) |
There was a problem hiding this comment.
@ThomasBinsfeld what I had in mind was
name = ir_config_model.get_param('ribbon.name')
name = name.format(db_name=db_name)So the format can be completely determined in the configuration file.
And put this bit in a separate method that is easy to override.
| width: 300px; | ||
| top: 25px; | ||
| left: -50px; | ||
| left: -100px; |
There was a problem hiding this comment.
Can we leave the ribbon size untouched in this PR?
There was a problem hiding this comment.
If we want to display on two lines, we have to change the size.
|
@ThomasBinsfeld LGTM. Can you please update the README with the new feature and an example using db_name? |
…(eg db_name) (OCA#621) * [ADD] .eggs in gitignore * [IMP] Web Environment Ribbon: add backend This commit adds a simple bakend to facilitate inheritance * [IMP] Web Environment Ribbon: add the databse name This commit adds the database name under the ribbon name, in the ribbon * [IMP] Web Environment Ribbon: prepare method for ribbon name * [IMP] README: explain how to use db_name
…(eg db_name) (OCA#621) * [ADD] .eggs in gitignore * [IMP] Web Environment Ribbon: add backend This commit adds a simple bakend to facilitate inheritance * [IMP] Web Environment Ribbon: add the databse name This commit adds the database name under the ribbon name, in the ribbon * [IMP] Web Environment Ribbon: prepare method for ribbon name * [IMP] README: explain how to use db_name
…(eg db_name) (OCA#621) * [ADD] .eggs in gitignore * [IMP] Web Environment Ribbon: add backend This commit adds a simple bakend to facilitate inheritance * [IMP] Web Environment Ribbon: add the databse name This commit adds the database name under the ribbon name, in the ribbon * [IMP] Web Environment Ribbon: prepare method for ribbon name * [IMP] README: explain how to use db_name
…(eg db_name) (OCA#621) * [ADD] .eggs in gitignore * [IMP] Web Environment Ribbon: add backend This commit adds a simple bakend to facilitate inheritance * [IMP] Web Environment Ribbon: add the databse name This commit adds the database name under the ribbon name, in the ribbon * [IMP] Web Environment Ribbon: prepare method for ribbon name * [IMP] README: explain how to use db_name
…(eg db_name) (OCA#621) * [ADD] .eggs in gitignore * [IMP] Web Environment Ribbon: add backend This commit adds a simple bakend to facilitate inheritance * [IMP] Web Environment Ribbon: add the databse name This commit adds the database name under the ribbon name, in the ribbon * [IMP] Web Environment Ribbon: prepare method for ribbon name * [IMP] README: explain how to use db_name
…(eg db_name) (OCA#621) * [ADD] .eggs in gitignore * [IMP] Web Environment Ribbon: add backend This commit adds a simple bakend to facilitate inheritance * [IMP] Web Environment Ribbon: add the databse name This commit adds the database name under the ribbon name, in the ribbon * [IMP] Web Environment Ribbon: prepare method for ribbon name * [IMP] README: explain how to use db_name
…(eg db_name) (OCA#621) * [ADD] .eggs in gitignore * [IMP] Web Environment Ribbon: add backend This commit adds a simple bakend to facilitate inheritance * [IMP] Web Environment Ribbon: add the databse name This commit adds the database name under the ribbon name, in the ribbon * [IMP] Web Environment Ribbon: prepare method for ribbon name * [IMP] README: explain how to use db_name
…(eg db_name) (#621) * [ADD] .eggs in gitignore * [IMP] Web Environment Ribbon: add backend This commit adds a simple bakend to facilitate inheritance * [IMP] Web Environment Ribbon: add the databse name This commit adds the database name under the ribbon name, in the ribbon * [IMP] Web Environment Ribbon: prepare method for ribbon name * [IMP] README: explain how to use db_name
…(eg db_name) (OCA#621) * [ADD] .eggs in gitignore * [IMP] Web Environment Ribbon: add backend This commit adds a simple bakend to facilitate inheritance * [IMP] Web Environment Ribbon: add the databse name This commit adds the database name under the ribbon name, in the ribbon * [IMP] Web Environment Ribbon: prepare method for ribbon name * [IMP] README: explain how to use db_name
…(eg db_name) (OCA#621) * [ADD] .eggs in gitignore * [IMP] Web Environment Ribbon: add backend This commit adds a simple bakend to facilitate inheritance * [IMP] Web Environment Ribbon: add the databse name This commit adds the database name under the ribbon name, in the ribbon * [IMP] Web Environment Ribbon: prepare method for ribbon name * [IMP] README: explain how to use db_name
…(eg db_name) (OCA#621) * [ADD] .eggs in gitignore * [IMP] Web Environment Ribbon: add backend This commit adds a simple bakend to facilitate inheritance * [IMP] Web Environment Ribbon: add the databse name This commit adds the database name under the ribbon name, in the ribbon * [IMP] Web Environment Ribbon: prepare method for ribbon name * [IMP] README: explain how to use db_name
…(eg db_name) (OCA#621) * [ADD] .eggs in gitignore * [IMP] Web Environment Ribbon: add backend This commit adds a simple bakend to facilitate inheritance * [IMP] Web Environment Ribbon: add the databse name This commit adds the database name under the ribbon name, in the ribbon * [IMP] Web Environment Ribbon: prepare method for ribbon name * [IMP] README: explain how to use db_name
…(eg db_name) (OCA#621) * [ADD] .eggs in gitignore * [IMP] Web Environment Ribbon: add backend This commit adds a simple bakend to facilitate inheritance * [IMP] Web Environment Ribbon: add the databse name This commit adds the database name under the ribbon name, in the ribbon * [IMP] Web Environment Ribbon: prepare method for ribbon name * [IMP] README: explain how to use db_name
…(eg db_name) (OCA#621) * [ADD] .eggs in gitignore * [IMP] Web Environment Ribbon: add backend This commit adds a simple bakend to facilitate inheritance * [IMP] Web Environment Ribbon: add the databse name This commit adds the database name under the ribbon name, in the ribbon * [IMP] Web Environment Ribbon: prepare method for ribbon name * [IMP] README: explain how to use db_name
…(eg db_name) (OCA#621) * [ADD] .eggs in gitignore * [IMP] Web Environment Ribbon: add backend This commit adds a simple bakend to facilitate inheritance * [IMP] Web Environment Ribbon: add the databse name This commit adds the database name under the ribbon name, in the ribbon * [IMP] Web Environment Ribbon: prepare method for ribbon name * [IMP] README: explain how to use db_name
…(eg db_name) (OCA#621) * [ADD] .eggs in gitignore * [IMP] Web Environment Ribbon: add backend This commit adds a simple bakend to facilitate inheritance * [IMP] Web Environment Ribbon: add the databse name This commit adds the database name under the ribbon name, in the ribbon * [IMP] Web Environment Ribbon: prepare method for ribbon name * [IMP] README: explain how to use db_name
…(eg db_name) (OCA#621) * [ADD] .eggs in gitignore * [IMP] Web Environment Ribbon: add backend This commit adds a simple bakend to facilitate inheritance * [IMP] Web Environment Ribbon: add the databse name This commit adds the database name under the ribbon name, in the ribbon * [IMP] Web Environment Ribbon: prepare method for ribbon name * [IMP] README: explain how to use db_name
…(eg db_name) (OCA#621) * [ADD] .eggs in gitignore * [IMP] Web Environment Ribbon: add backend This commit adds a simple bakend to facilitate inheritance * [IMP] Web Environment Ribbon: add the databse name This commit adds the database name under the ribbon name, in the ribbon * [IMP] Web Environment Ribbon: prepare method for ribbon name * [IMP] README: explain how to use db_name
…(eg db_name) (OCA#621) * [ADD] .eggs in gitignore * [IMP] Web Environment Ribbon: add backend This commit adds a simple bakend to facilitate inheritance * [IMP] Web Environment Ribbon: add the databse name This commit adds the database name under the ribbon name, in the ribbon * [IMP] Web Environment Ribbon: prepare method for ribbon name * [IMP] README: explain how to use db_name
…(eg db_name) (OCA#621) * [ADD] .eggs in gitignore * [IMP] Web Environment Ribbon: add backend This commit adds a simple bakend to facilitate inheritance * [IMP] Web Environment Ribbon: add the databse name This commit adds the database name under the ribbon name, in the ribbon * [IMP] Web Environment Ribbon: prepare method for ribbon name * [IMP] README: explain how to use db_name
…(eg db_name) (OCA#621) * [ADD] .eggs in gitignore * [IMP] Web Environment Ribbon: add backend This commit adds a simple bakend to facilitate inheritance * [IMP] Web Environment Ribbon: add the databse name This commit adds the database name under the ribbon name, in the ribbon * [IMP] Web Environment Ribbon: prepare method for ribbon name * [IMP] README: explain how to use db_name
…(eg db_name) (OCA#621) * [ADD] .eggs in gitignore * [IMP] Web Environment Ribbon: add backend This commit adds a simple bakend to facilitate inheritance * [IMP] Web Environment Ribbon: add the databse name This commit adds the database name under the ribbon name, in the ribbon * [IMP] Web Environment Ribbon: prepare method for ribbon name * [IMP] README: explain how to use db_name
web_environment_ribbonget_environment_ribbon()can be overridden to change the standard behavior(Preview on Odoo 9.0 Enterprise)
This PR is an other solution for #588