Skip to content

Instantly share code, notes, and snippets.

View saber13812002's full-sized avatar
💭
stackoverflow+codegrepper.com

Saber tabatabaee yazdi saber13812002

💭
stackoverflow+codegrepper.com
View GitHub Profile
[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 / 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>
@saber13812002
saber13812002 / .env
Created May 4, 2021 19:23
laravel cpanel problem with public_path storage folder voyager نحوه صحیح آپلود فایل در هاست لاراول
// add these two lines into .env
FILESYSTEM_DRIVER=parswebserver
STORAGE_PATH="/home/pardisa2/public_html"
@Hidenmy
Hidenmy / gmap.js
Last active October 11, 2022 13:03
odoo widget
odoo.define('parking_map_widget', function (require) {
"use strict";
var Widget = require("web.Widget");
var widgetRegistry = require("web.widget_registry");
var ajax = require('web.ajax');
var setGoogleMap = () => {
var script = document.createElement("script");
script.id = "gmap_script";
@saber13812002
saber13812002 / README.md
Last active April 11, 2021 09:25
customize The add new item link in SharePoint

How can we create one to many relation by two or more lists in sharepoint

1- first you need two lists (please create them) neming: parent and child

2- in child list you need to have a look up field to ( to the parent column)

NOTE: PLEASE SELECT :ID field as extra field to your list

what we expected:

@saber13812002
saber13812002 / UserModel.php
Last active October 26, 2020 07:50
set all information of user or model to null after restore Laravel Setting null values only on certain fields
// BaseModel Class
protected $nullable = [];
/**
* Listen for save event
*/
protected static function boot()
{
parent::boot();
@saber13812002
saber13812002 / gist:e87f59fbb4dde6e08135d24bfd67b27f
Created September 8, 2020 07:18
laravel persian numbers عدد اعداد فارسی برای لاراول
function persianNumber($englishNumber)
{
return str_replace(['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],
['۰', '۱', '۲', '۳', '۴', '۵', '۶', '۷', '۸', '۹'], $englishNumber);
}
@texone
texone / grasshopper csharp only
Created January 16, 2020 22:45
mesh based reaction diffusion
using System;
using System.Collections;
using System.Collections.Generic;
using Rhino;
using Rhino.Geometry;
using Grasshopper;
using Grasshopper.Kernel;
using Grasshopper.Kernel.Data;
@mhemrg
mhemrg / example.php
Created November 24, 2019 09:25
Liara
if( ! app()->runningInConsole()) {
// Your code...
}
@CakJuice
CakJuice / odoo12_custom_report_template.xml
Created May 24, 2019 06:03
Odoo 12 custom report template
<odoo>
<record model="report.paperformat" id="paperformat_attendance_recap_report">
<field name="name">paperformat.attendance.recap.report</field>
<field name="default" eval="True"/>
<field name="format">A4</field>
<field name="page_width">0</field>
<field name="page_width">0</field>
<field name="orientation">Portrait</field>
<field name="margin_top">30</field>
<field name="margin_right">5</field>