Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Truong develop #5

Open
wants to merge 84 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
4109ce0
docker compose done
hglong16 Jun 3, 2022
7e8c56a
fix docker, add staging
hglong16 Jun 9, 2022
71df66a
add test_server
hglong16 Jun 9, 2022
f4d6eaa
show valid date
hglong16 Jun 28, 2022
ec7260b
sua loi chinh ta
hglong16 Jun 29, 2022
265a6c6
sua loi chinh ta 2
hglong16 Jun 29, 2022
c67b8e2
facing bug invoice.xml fail
hglong16 Jun 29, 2022
a965973
fix bug xml
hglong16 Jun 29, 2022
c5ac678
add tmp
svseas Jun 29, 2022
be6ce80
add readme
svseas Jun 29, 2022
aab222d
update README.md
hglong16 Jun 29, 2022
fcf2dfd
fix project instruction
svseas Jun 30, 2022
e9a5d31
Merge branch 'master' of https://github.com/hglong16/merctrans-odoo
svseas Jun 30, 2022
fc154b6
fix project view and default view
svseas Jun 30, 2022
07d0e9d
increment number_id
hglong16 Jun 30, 2022
e8f5706
update gitignore delete tags
hglong16 Jun 30, 2022
e5af8c0
project_id with name of client, create date and no number
hglong16 Jun 30, 2022
6f0a93a
start dev job tree, button job, client_ menu
hglong16 Jul 1, 2022
18cc932
done menu and model merctrans client, need seicurity
hglong16 Jul 1, 2022
ad36910
fix projects
svseas Jul 1, 2022
d279686
fix conflicts
svseas Jul 1, 2022
855524c
fix invoices
svseas Jul 1, 2022
f20e80a
update gitignore
hglong16 Jul 6, 2022
16e2885
add venv 2 gitignore
hglong16 Jul 6, 2022
3164914
Done name and security
hglong16 Jul 6, 2022
6079704
fix job, project database and view
hglong16 Jul 7, 2022
7c12c4d
delete secret
hglong16 Jul 7, 2022
f9316e6
fix bug many2one
hglong16 Jul 8, 2022
6c9ded0
Update README.md
hglong16 Jul 13, 2022
b17db7d
Closes #3
svseas Jul 13, 2022
e1c6f33
Merge branch 'develop' of https://github.com/hglong16/merctrans-odoo
hglong16 Jul 13, 2022
e1b1566
Fix default currencies
svseas Jul 13, 2022
e14da0d
some changes
svseas Jul 13, 2022
97e6ed6
fix currencies
svseas Jul 13, 2022
52fde86
add clients
svseas Jul 13, 2022
af3de1e
fix create in project view, fix order in project, fix client country
svseas Jul 14, 2022
081730d
job in project, bug has some but
hglong16 Jul 14, 2022
fc71982
Merge branch 'master' of https://github.com/hglong16/merctrans-odoo
svseas Jul 13, 2022
6b53ff0
fix client project
svseas Jul 14, 2022
4862bc0
fix client project
svseas Jul 14, 2022
230e837
fix project menu
svseas Jul 14, 2022
1e7dc12
add client history and client invoice history
svseas Jul 14, 2022
6bfb44e
start docker auto update module
hglong16 Jul 14, 2022
cc41957
job_value -> project_value DONE
hglong16 Jul 14, 2022
86f6f24
delete wrong file
hglong16 Jul 14, 2022
f666387
rename file
hglong16 Jul 14, 2022
8157d77
jobs >> po, pos, purchase order
hglong16 Jul 14, 2022
1cef357
change layout of pos
hglong16 Jul 14, 2022
fa1a82c
fix menu project
svseas Jul 14, 2022
64a8a44
add client project history and invoice history
svseas Jul 14, 2022
ddd95d7
add margin to project, fix required fields in projects, fix display f…
svseas Jul 14, 2022
2f3b3f2
add blank line
hglong16 Jul 15, 2022
cb483b9
updated readme bash and postgres
hglong16 Jul 20, 2022
8e0be55
add service pgadmin4
hglong16 Jul 20, 2022
59be719
PO ID Done
hglong16 Jul 21, 2022
c6fbe58
default date
hglong16 Jul 21, 2022
75dfbb6
fix view
svseas Jul 21, 2022
57d210b
change required, name some fields in pos
hglong16 Jul 22, 2022
3aa2457
invoice id done
hglong16 Jul 22, 2022
16b4e22
fix bug po in pos
hglong16 Jul 22, 2022
bf6479c
merge commit client cannot create
hglong16 Jul 22, 2022
a28f4c8
fix bug, domain err >> variables in domain need defined
hglong16 Jul 22, 2022
fa068b6
form PO cant create
hglong16 Jul 22, 2022
35620fb
missing self keyword in defaul due_date in pos.py
hglong16 Jul 22, 2022
41e2c3d
facing bug default due_date
hglong16 Jul 22, 2022
3f5189e
turn off create in tree view
hglong16 Jul 22, 2022
eede134
add 3 digit ids
hglong16 Jul 22, 2022
4a611e7
fix client fields
svseas Jul 26, 2022
0437010
add xlwt package and bring odoo Dockerfile to local
hglong16 Jul 26, 2022
3297852
No need sudo install xlwt
hglong16 Jul 26, 2022
5e87fe2
model contributors done
hglong16 Jul 26, 2022
e8a915b
fix menu
svseas Jul 26, 2022
604a02d
change contributor -> res.users and add total po field
svseas Jul 26, 2022
744eee7
total po in tree view
svseas Jul 26, 2022
f4d4be8
update gitignore tren may anh truong
svseas Jul 26, 2022
06bb2ce
change contributor res.partner -> res.users
hglong16 Jul 26, 2022
7b6c65c
hoanglong pro vcl -> new images odoo
hglong16 Jul 26, 2022
055c9e4
sua loi cua anh Truong integer != Char
hglong16 Jul 26, 2022
eef5e02
clean docker
hglong16 Jul 27, 2022
37a21c0
fix things
svseas Jul 27, 2022
e282ab2
open ports 8070 8071
svseas Jul 27, 2022
b0e9e25
fix clients, fix client view, change client to account, add contact t…
svseas Jul 27, 2022
f2aaec1
fix conflicts
svseas Jul 27, 2022
0a9197f
fix contact email constrains
svseas Jul 27, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
*/__pycache__/
__pycache__
*.pyc
odoo/
.idea
docker-compose.yml
tags
venv
*.swp
Dockerfile
local-addons/merctrans_projects/__pycache__
local-addons/merctrans_projects/controllers/__pycache__
local-addons/merctrans_projects/models/__pycache__
odoo
tags
91 changes: 91 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
FROM debian:bullseye-slim
MAINTAINER Odoo S.A. <[email protected]>

SHELL ["/bin/bash", "-xo", "pipefail", "-c"]

# Generate locale C.UTF-8 for postgres and general locale data
ENV LANG C.UTF-8

# Install some deps, lessc and less-plugin-clean-css, and wkhtmltopdf
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
curl \
dirmngr \
fonts-noto-cjk \
gnupg \
libssl-dev \
node-less \
npm \
python3-num2words \
python3-pdfminer \
python3-pip \
python3-phonenumbers \
python3-pyldap \
python3-qrcode \
python3-renderpm \
python3-setuptools \
python3-slugify \
python3-vobject \
python3-watchdog \
python3-xlrd \
python3-xlwt \
xz-utils \
&& curl -o wkhtmltox.deb -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.buster_amd64.deb \
&& echo 'ea8277df4297afc507c61122f3c349af142f31e5 wkhtmltox.deb' | sha1sum -c - \
&& apt-get install -y --no-install-recommends ./wkhtmltox.deb \
&& rm -rf /var/lib/apt/lists/* wkhtmltox.deb

RUN pip install xlwt==1.1.2

# install latest postgresql-client
RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ bullseye-pgdg main' > /etc/apt/sources.list.d/pgdg.list \
&& GNUPGHOME="$(mktemp -d)" \
&& export GNUPGHOME \
&& repokey='B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8' \
&& gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "${repokey}" \
&& gpg --batch --armor --export "${repokey}" > /etc/apt/trusted.gpg.d/pgdg.gpg.asc \
&& gpgconf --kill all \
&& rm -rf "$GNUPGHOME" \
&& apt-get update \
&& apt-get install --no-install-recommends -y postgresql-client \
&& rm -f /etc/apt/sources.list.d/pgdg.list \
&& rm -rf /var/lib/apt/lists/*

# Install rtlcss (on Debian buster)
RUN npm install -g rtlcss

# Install Odoo
ENV ODOO_VERSION 15.0
ARG ODOO_RELEASE=20220718
ARG ODOO_SHA=dc4a5b8c5be8f873e751539117f5aa41d9f7b217
RUN curl -o odoo.deb -sSL http://nightly.odoo.com/${ODOO_VERSION}/nightly/deb/odoo_${ODOO_VERSION}.${ODOO_RELEASE}_all.deb \
&& echo "${ODOO_SHA} odoo.deb" | sha1sum -c - \
&& apt-get update \
&& apt-get -y install --no-install-recommends ./odoo.deb \
&& rm -rf /var/lib/apt/lists/* odoo.deb

# Copy entrypoint script and Odoo configuration file
COPY ./entrypoint.sh /
COPY ./odoo.conf /etc/odoo/

# Set permissions and Mount /var/lib/odoo to allow restoring filestore and /mnt/extra-addons for users addons
RUN chown odoo /etc/odoo/odoo.conf \
&& mkdir -p /mnt/extra-addons \
&& chown -R odoo /mnt/extra-addons \
&& chown -R odoo /entrypoint.sh
VOLUME ["/var/lib/odoo", "/mnt/extra-addons"]

# Expose Odoo services
EXPOSE 8069 8071 8072

# Set the default config file
ENV ODOO_RC /etc/odoo/odoo.conf

COPY wait-for-psql.py /usr/local/bin/wait-for-psql.py

# Set default user when running the container
USER odoo

ENTRYPOINT ["/entrypoint.sh"]
CMD ["odoo"]
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Merctrans Project Manager
- debug docker odoo
``` bash
docker exec -it 02_merctrans_odoo-web_prod-1 bash -c "odoo shell -d merctrans"
```
- docker exec -it 02_merctrans_odoo-web_prod-1 bash -c "odoo shell -d merctrans"
- Connect Postgres in docker
``` bash
# name_service_db = 02_merctrans_odoo-db-1
docker exec -it 02_merctrans_odoo-db-1 bash
# Sau khi connect duoc vao bash cua odoo service
psql -U odoo postgres
```

connect pgadmin4 - port 5433
**Create new server**
hostname/address : db
username: odoo
password: odoo
60 changes: 60 additions & 0 deletions config-test/odoo.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
[options]
addons_path = /usr/lib/python3/dist-packages/odoo/addons,/mnt/extra-addons
admin_passwd = $pbkdf2-sha512$25000$PGcsJUQoBQBAaK01xhhDiA$/NTAxCw1WKf.AhwdY8GSeD.g661WlpE0egA6Xn7wPaHISvuNqzPAia5ltfU29FMsWNXOPo29vGMgH6bw3G9fBA
csv_internal_sep = ,
data_dir = /var/lib/odoo/.local/share/Odoo
db_host = db_test
db_maxconn = 64
db_name = merctrans_test
db_password = odoo
db_port = 5432
db_sslmode = prefer
db_template = template0
db_user = odoo
dbfilter =
demo = {}
email_from = [email protected]
geoip_database = /usr/share/GeoIP/GeoLite2-City.mmdb
http_enable = True
http_interface =
http_port = 8069
import_partial =
limit_memory_hard = 2684354560
limit_memory_soft = 2147483648
limit_request = 8192
limit_time_cpu = 60
limit_time_real = 120
limit_time_real_cron = -1
list_db = False
log_db = False
log_db_level = warning
log_handler = :INFO
log_level = info
logfile =
longpolling_port = 8072
max_cron_threads = 2
osv_memory_age_limit = False
osv_memory_count_limit = False
pg_path =
pidfile =
proxy_mode = False
reportgz = False
screencasts =
screenshots = /tmp/odoo_tests
server_wide_modules = base,web
smtp_password = False
smtp_port = 25
smtp_server = localhost
smtp_ssl = False
smtp_user = False
syslog = False
test_enable = False
test_file =
test_tags = None
transient_age_limit = 1.0
translate_modules = ['all']
unaccent = False
upgrade_path =
without_demo = True
workers = 0

60 changes: 60 additions & 0 deletions config/odoo.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
[options]
addons_path = /usr/lib/python3/dist-packages/odoo/addons,/mnt/extra-addons
admin_passwd = $pbkdf2-sha512$25000$PGcsJUQoBQBAaK01xhhDiA$/NTAxCw1WKf.AhwdY8GSeD.g661WlpE0egA6Xn7wPaHISvuNqzPAia5ltfU29FMsWNXOPo29vGMgH6bw3G9fBA
csv_internal_sep = ,
data_dir = /var/lib/odoo/.local/share/Odoo
db_host = db
db_maxconn = 64
db_name = merctrans
db_password = odoo
db_port = 5432
db_sslmode = prefer
db_template = template0
db_user = odoo
dbfilter =
demo = False
email_from = [email protected]
geoip_database = /usr/share/GeoIP/GeoLite2-City.mmdb
http_enable = True
http_interface =
http_port = 8069
import_partial =
limit_memory_hard = 2684354560
limit_memory_soft = 2147483648
limit_request = 8192
limit_time_cpu = 60
limit_time_real = 120
limit_time_real_cron = -1
list_db = False
log_db = False
log_db_level = warning
log_handler = :INFO
log_level = info
logfile =
longpolling_port = 8072
max_cron_threads = 2
osv_memory_age_limit = False
osv_memory_count_limit = False
pg_path =
pidfile =
proxy_mode = False
reportgz = False
screencasts =
screenshots = /tmp/odoo_tests
server_wide_modules = base,web
smtp_password = False
smtp_port = 25
smtp_server = localhost
smtp_ssl = False
smtp_user = False
syslog = False
test_enable = False
test_file =
test_tags = None
transient_age_limit = 1.0
translate_modules = ['all']
unaccent = False
upgrade_path =
without_demo = True
workers = 0

63 changes: 63 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
version: "3.1"
services:
web_prod:
<<<<<<< HEAD
image: hglong16/odoo:latest
=======
images: odoo:15
>>>>>>> 37a21c0b9ccef2098ef98d76aa45bb8beb01adac
depends_on:
- db
ports:
- "8069:8069"
- "8070:8072"
- "8071:8071"
volumes:
- odoo-web-data:/var/lib/odoo
- ./config:/etc/odoo
- ./local-addons:/mnt/extra-addons
environment:
- USER=odoo
- PASSWORD=odoo
networks:
- postgres
command: >
-u merctrans_projects
db:
image: postgres:13
environment:
- POSTGRES_DB=postgres
- POSTGRES_PASSWORD=odoo
- POSTGRES_USER=odoo
- PGDATA=/var/lib/postgresql/data/pgdata
volumes:
- odoo-db-data:/var/lib/postgresql/data/pgdata
networks:
- postgres
pgadmin:
container_name: pgadmin_container
image: dpage/pgadmin4
environment:
PGADMIN_DEFAULT_EMAIL: [email protected]
PGADMIN_DEFAULT_PASSWORD: admin
PGADMIN_CONFIG_SERVER_MODE: 'False'
volumes:
- pgadmin:/var/lib/pgadmin

ports:
- 5433:80
networks:
- postgres
restart: unless-stopped

networks:
postgres:
driver: bridge


volumes:
odoo-web-data:
odoo-db-data:
pgadmin:


Empty file modified local-addons/merctrans_projects/__init__.py
100644 → 100755
Empty file.
8 changes: 6 additions & 2 deletions local-addons/merctrans_projects/__manifest__.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
'0.1',

# any module necessary for this one to work correctly
'depends': ['base', 'sale'],
'depends': ['base'],

# always loaded
'data': [
Expand All @@ -34,10 +34,14 @@
'security/security_rules.xml',
'security/ir.model.access.csv',
# View <>
'views/pos.xml',
'views/clients.xml',
'views/contributors.xml',
'views/projects_menus.xml',
'views/templates.xml',
# 'views/sale.xml',
'views/jobs.xml'
#data
'data/currencies.xml'
],
# only loaded in demonstration mode
'demo': [
Expand Down
Binary file not shown.
Binary file not shown.
Empty file modified local-addons/merctrans_projects/controllers/__init__.py
100644 → 100755
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file modified local-addons/merctrans_projects/controllers/controllers.py
100644 → 100755
Empty file.
34 changes: 34 additions & 0 deletions local-addons/merctrans_projects/data/currencies.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<!-- Currencies -->
<!-- Add currencies.xml to data to override base currency -->
<record id="base.USD" model="res.currency">
<field name="name">USD</field>
<field name="symbol">$</field>
<field name="rounding">0.01</field>
<field name="active" eval="True"/>
<field name="position">before</field>
<field name="currency_unit_label">Dollars</field>
<field name="currency_subunit_label">Cents</field>
</record>

<record id="base.EUR" model="res.currency">
<field name="name">EUR</field>
<field name="symbol">€</field>
<field name="rounding">0.01</field>
<field name="active" eval="True"/>
<field name="currency_unit_label">Euros</field>
<field name="currency_subunit_label">Cents</field>
</record>

<record id="base.VND" model="res.currency">
<field name="name">VND</field>
<field name="symbol">₫</field>
<field name="rounding">1.00</field>
<field name="active" eval="True"/>
<field name="currency_unit_label">Dong</field>
<field name="currency_subunit_label">Xu</field>
</record>
</data>
</odoo>
Empty file modified local-addons/merctrans_projects/demo/demo.xml
100644 → 100755
Empty file.
3 changes: 1 addition & 2 deletions local-addons/merctrans_projects/models/__init__.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# -*- coding: utf-8 -*-

from . import merctrans_projects
# from . import merctrans_sales
from . import merctrans_jobs
from . import merctrans_clients, merctrans_pos, merctrans_projects, merctrans_invoices, merctrans_contributors
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading