Skip to content

Instantly share code, notes, and snippets.

View herawais's full-sized avatar

Mohammad Awais herawais

View GitHub Profile
@herawais
herawais / index.ts
Created October 5, 2023 10:57
src/api /index.ts
//start of APIs for brand-------------------
//GET ALL BRANDS
app.get("/store/brands", cors(storeCorsOptions), async (req, res) => {
const brandService = req.scope.resolve("brandService");
brandService.getBrands().then((brands) => {
return res.json(brands);
});
});
document.querySelector("body > header > nav > ul.o_menu_systray > li.o_user_menu.show > div > a:nth-child(1)").remove()
@herawais
herawais / website_sale_utils.xml
Created June 6, 2021 14:21
Odoo Template Inheritance
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<!-- Products Search Bar autocomplete item -->
<t t-name="website_sale.productsSearchBar.autocomplete.custom" t-inherit="website_sale.productsSearchBar.autocomplete" t-inherit-mode="extension" owl="1">
<xpath expr="//b[hasclass('text-nowrap')]" t-operation="before">
<b class="text-nowrap">
custom code
</b>
</xpath>
@herawais
herawais / gist:19794df76ec7dd5d0b18230a5465eb85
Created September 9, 2020 12:02
field value is not saving to DB with custom widget | Odoo12 CE
Hi, I created a new custom widget extended from AbstractField, using custom template. I want to save custom value in this field,
I am using _setValue() but it is not saving.
would you please guide me how to save that value.
here is the image
https://tinyurl.com/y32yzdml
@herawais
herawais / odoo-saas-deployment-logs.txt
Created July 19, 2020 15:27
Odoo SaaS deployment on Digital Ocean Error
root@ubuntu-s-----------:~/SaaS/saas_demo# docker-compose run dodoo init -n apps -m saas_demo --no-demo --no-cache
Starting saas_demo_wdb_1 ... done
Starting saas_demo_db_1 ... done
==> Sourcing /entrypoint.d/05-set-appenv-ci.sh
==> Sourcing /entrypoint.d/10-set-appenv.sh
==> Adding /opt/odoo/vendor/OCA/queue to addons path
==> Adding /opt/odoo/vendor/it-projects-llc/access-addons to addons path
[options]
#
# WARNING:
# If you use the Odoo Database utility to change the master password be aware
# that the formatting of this file WILL be LOST! A copy of this file named
# /etc/odoo/openerp-server.conf.template has been made in case this happens
# Note that the copy does not have any first boot changes
#-----------------------------------------------------------------------------
# Odoo Server Config File - TurnKey Linux
@herawais
herawais / student fee details error
Created March 24, 2020 09:07
not printing the invoice
2020-03-24 09:07:11,227 20746 DEBUG ems_development odoo.sql_db: create serialized cursor to {'database': 'ems_development', 'sslmode': 'prefer'}
2020-03-24 09:07:11,228 20746 DEBUG ems_development odoo.sql_db: ConnectionPool(used=2/count=4/max=64) Borrow existing connection to 'sslmode=prefer dbname=ems_development' at index 1
2020-03-24 09:07:11,230 20746 DEBUG ems_development odoo.sql_db: query: SELECT base_registry_signaling.last_value,
base_cache_signaling.last_value
FROM base_registry_signaling, base_cache_signaling
2020-03-24 09:07:11,231 20746 DEBUG ems_development odoo.sql_db: SUM from:0:00:00/1 [2764]
2020-03-24 09:07:11,231 20746 DEBUG ems_development odoo.sql_db: SUM into:0:00:00/1 [2764]
2020-03-24 09:07:11,231 20746 DEBUG ems_development odoo.sql_db: ConnectionPool(used=2/count=4/max=64) Give back connection to 'sslmode=prefer dbname=ems_development'
2020-03-24 09:07:11,232 20746 DEBUG ems_development odoo.sql_db: ConnectionPool