Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Coopdevs OCB mirror
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Coopdevs
Odoo
Coopdevs OCB mirror
Commits
9cfd4a5c
Commit
9cfd4a5c
authored
7 years ago
by
Christophe Simonis
Browse files
Options
Downloads
Plain Diff
[MERGE] forward port branch saas-14 up to
caea203b
parents
ad3cc1b2
caea203b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
MANIFEST.in
+5
-0
5 additions, 0 deletions
MANIFEST.in
addons/purchase/views/account_invoice_views.xml
+1
-1
1 addition, 1 deletion
addons/purchase/views/account_invoice_views.xml
addons/website_quote/models/sale_order.py
+10
-8
10 additions, 8 deletions
addons/website_quote/models/sale_order.py
with
16 additions
and
9 deletions
MANIFEST.in
+
5
−
0
View file @
9cfd4a5c
...
...
@@ -4,6 +4,7 @@ include README.md
recursive-include odoo *.css
recursive-include odoo *.csv
recursive-include odoo *.doc
recursive-include odoo *.docx
recursive-include odoo *.eml
recursive-include odoo *.eot
recursive-include odoo *.gif
...
...
@@ -16,6 +17,8 @@ recursive-include odoo *.less
recursive-include odoo *.md
recursive-include odoo *.mp3
recursive-include odoo *.ogg
recursive-include odoo *.ods
recursive-include odoo *.odt
recursive-include odoo *.otf
recursive-include odoo *.pdf
recursive-include odoo *.png
...
...
@@ -35,7 +38,9 @@ recursive-include odoo *.wsdl
recursive-include odoo *.xls
recursive-include odoo *.xsd
recursive-include odoo *.xsl
recursive-include odoo *.xlsx
recursive-include odoo *.xml
recursive-include odoo *.yml
recursive-include odoo *.zip
recursive-exclude * *.py[co]
recursive-exclude * *.hg*
This diff is collapsed.
Click to expand it.
addons/purchase/views/account_invoice_views.xml
+
1
−
1
View file @
9cfd4a5c
...
...
@@ -59,7 +59,7 @@
<field
name=
"inherit_id"
ref=
"account.invoice_supplier_form"
/>
<field
name=
"arch"
type=
"xml"
>
<field
name=
"reference"
position=
"after"
>
<field
name=
"purchase_id"
attrs=
"{'readonly': [('state','not in',['draft'])], 'invisible': [('state', '=', 'purchase')]}"
class=
"oe_edit_only"
<field
name=
"purchase_id"
attrs=
"{'readonly': [('state','not in',['draft'])], 'invisible': [
'|',
('state', '=', 'purchase')
, ('type', '=', 'in_refund')
]}"
class=
"oe_edit_only"
options=
"{'no_create': True}"
/>
</field>
<xpath
expr=
"//field[@name='invoice_line_ids']/tree/field[@name='company_id']"
position=
"after"
>
...
...
This diff is collapsed.
Click to expand it.
addons/website_quote/models/sale_order.py
+
10
−
8
View file @
9cfd4a5c
...
...
@@ -55,6 +55,15 @@ class SaleOrder(models.Model):
def
_get_default_template_id
(
self
):
return
self
.
env
.
ref
(
'
website_quote.website_quote_template_default
'
,
raise_if_not_found
=
False
)
def
_default_require_payment
(
self
):
default_template
=
self
.
_get_default_template_id
()
if
self
.
template_id
:
return
self
.
template_id
.
require_payment
elif
default_template
:
return
default_template
.
require_payment
else
:
return
0
access_token
=
fields
.
Char
(
'
Security Token
'
,
copy
=
False
,
default
=
lambda
self
:
str
(
uuid
.
uuid4
()),
required
=
True
)
...
...
@@ -74,14 +83,7 @@ class SaleOrder(models.Model):
(
0
,
'
Not mandatory on website quote validation
'
),
(
1
,
'
Immediate after website order validation
'
),
(
2
,
'
Immediate after website order validation and save a token
'
),
],
'
Payment
'
,
help
=
"
Require immediate payment by the customer when validating the order from the website quote
"
,
compute
=
'
_compute_require_payment
'
,
store
=
True
)
@api.one
@api.depends
(
'
template_id
'
)
def
_compute_require_payment
(
self
):
# Do not overwrite if the field is already set
if
self
.
template_id
and
(
self
.
require_payment
is
None
or
self
.
require_payment
is
False
):
self
.
require_payment
=
self
.
template_id
.
require_payment
],
'
Payment
'
,
help
=
"
Require immediate payment by the customer when validating the order from the website quote
"
,
default
=
_default_require_payment
)
@api.multi
def
copy
(
self
,
default
=
None
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment