-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[ADD] sales: create new page 'Margins'. #15049
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Congrats on pushing your first PR, @meval1006 !! 🎊
You’ve clearly understood the feature well. However, the doc currently reads more like a summary or description of the margin feature, rather than a step-by-step guide that helps users apply it on a quote or sales order.
There are also a few minor style notes (e.g., when to use :guilabel: for labels), but that’s nothing major as you’ll naturally pick up those conventions as you continue working with the team!
Your PR is basically there, we just need to reframe things differently and it'll be ready!
| In the Odoo **Sales** application, it is possible to show sales margins on quotations and sales | ||
| orders. Doing so allows for better management and monitoring of profitability and sustainable | ||
| growth. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your introduction is clear, and it effectively explains the feature and its value without unnecessary fluff! Greaet work, it's what I'm looking for!
The only point that needs clarification is “sustainable growth.” What exactly does this refer to? The sentence “Doing so allows for better management and monitoring of profitability” already conveys a strong idea on its own.
You could make the message even stronger by addressing the reader directly. For instance:
Salespeople can use the feature to better monitor profitability per quotation line item.
| Calculating margins | ||
| ------------------- | ||
|
|
||
| The sales margin for a product is calculated by subtracting the **Cost Price** from the **Sales | ||
| Price**: :math:`Sales~Margin = Sales~Price - Cost~Price`. | ||
|
|
||
| .. image:: margin/product-view.png | ||
| :alt: Cable Management box product page. | ||
|
|
||
| .. important:: | ||
| Sales margin calculation requires the Cost and Sales Price fields of the product to be filled. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the purpose of this section? It seems like you're instructing people to fill out the product form? Let's use a bit more commanding language if that's the case, like
| Calculating margins | |
| ------------------- | |
| The sales margin for a product is calculated by subtracting the **Cost Price** from the **Sales | |
| Price**: :math:`Sales~Margin = Sales~Price - Cost~Price`. | |
| .. image:: margin/product-view.png | |
| :alt: Cable Management box product page. | |
| .. important:: | |
| Sales margin calculation requires the Cost and Sales Price fields of the product to be filled. | |
| Calculating margins | |
| ------------------- | |
| To automatically calculate the sales margin for each quotation or sales order line item, go to :menuselection:`[insert directions to go to the product form]` and fill out the :guilabel:`Sales Price` and :guilabel:`Cost` fields. | |
| The margin is calculated by subtracting the **Cost Price** from the **Sales | |
| Price** :math:`Sales~Margin = Sales~Price - Cost~Price`. | |
| .. image:: margin/product-view.png | |
| :alt: Cable Management box product page. |
(If you accept my suggestion of making it more instructional, i think we can move the contents of your important block into the main explanation itself)
| .. important:: | ||
| Sales margin calculation requires the Cost and Sales Price fields of the product to be filled. | ||
|
|
||
| View Margins |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpicking here, but "view" sounds like we're looking at a graph. How about a title like "Compute margin on quote"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh but this might clash with the suggested title I gave above, "calculating margin" and "Compute margin" is too similar.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about having this structure/titles, so configuration sections look like theyre clearly set up, and the workflow titles are action-oriented? Feel free to change the wording around!
Configuration
=====
Configure price and cost
----------------
For product form setup
Compute margins on SOs
===============
For adding the margin on sales orders/quotes!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the 'Compute margins on SOs' is 'Enable' an acceptable substitute?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's great! thank you (:
af263e8 to
f2965a8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
omg @meval1006 this is 98% there!! I'm setting it as request changes because this is your very first PR, and i want to do one last double check before merging. I had no major issues to point out this iteration! Just some optional suggestions to perfect it to consider (:
| .. image:: margin/SO-with-margins-checkboxes.png | ||
| :alt: Sales order with Margin and Margin(%) columns displayed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this picture is really similar with the picture above. let's keep just one of them.
I like the zoom of the second one, especially since you hid columns that weren't necessary. However, this second image hides the Margin% column, that I think the reader should see. Although I think it's helpful to show ppl where the settings adjust icon is, though. Alot of ppl miss it
4853a6a to
a1272ce
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Imagine you want to apply a seasonal 5% discount on blue denim jeans. The discount requires a | ||
| minumim of two pairs of jeans in an order and applies only from October to the end of December. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use "you" sparingly since it can come across as overly familiar with the reader. We're more lax with the use of "your" because sometimes, when we're talking about multiple roles, like the user, who owns a company and is setting up Odoo for their business, and how it might be displayed for the customer.When referring to the business, we might use "when setting up __ for your company..."
What do you think about:
| Imagine you want to apply a seasonal 5% discount on blue denim jeans. The discount requires a | |
| minumim of two pairs of jeans in an order and applies only from October to the end of December. | |
| To apply a seasonal 5% discount on blue denim jeans that requires a | |
| minimum of two pairs of jeans in an order and is valid only from October to the end of December, |
| The pricelist rule should look like this: | ||
|
|
||
| .. image:: margin/pricelist-configuration.png | ||
| :align: center | ||
| :alt: Pricelist Rules pop-up window. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kind of an overkill, but we tend to not rely on images to tell stories, in case the images don't load for people. It can be quite wordy though, so maybe we can describe the image using a figure.
| The pricelist rule should look like this: | |
| .. image:: margin/pricelist-configuration.png | |
| :align: center | |
| :alt: Pricelist Rules pop-up window. | |
| The pricelist rule should look like this: | |
| .. figure:: margin/pricelist-configuration.png | |
| :align: center | |
| :alt: Pricelist Rules pop-up window. | |
| [Insert description of the image here] |
This is an optional suggestion! Don't have to follow it :D
| After saving the pricelist, go to your SO and select the newly created pricelist, and adjust the | ||
| quanity according to the pricelist rule. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- required: abbreviations should use the abbr markup
- opinion: don't think "your" is necessary here, but the suggested rewrite is longer
- required: typo for quantity
Note: Feel free to edit this suggestion to choose the rewrite that you want to accept, and commit that!
| After saving the pricelist, go to your SO and select the newly created pricelist, and adjust the | |
| quanity according to the pricelist rule. | |
| After saving the pricelist, go to the desired :abbr:`SO (sales order)` and select the newly created pricelist, and adjust the | |
| quantity according to the pricelist rule. |
| After you made these changes, click :guilabel:`Update Prices` to update the product price and | ||
| margin. The margin is recalculated based on the price-list-adjusted sales price and the product's | ||
| cost price. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- optional: removing you
- optional/question: are you referring to specific Odoo fields when referring to "sales price* and "margin"? If so, we should match the capitalization of the UI, and use italics, but NOT guilabel, as guilabel only refers to a field that we're referring to directly in an instruction or on the page we're looking at (though, technically, we can see Margin on the SO, so maybe we should guilabel that, and change "Sales Price" to the equivalent column we see on the sales order, "Unit Price", and put a guilabel on that? This is kinda getting really nitty gritty and I don't want to argue with you about something so specific 🤡 , so let's go with whatever you decide!
- required: add the icon in front of Update Prices. Since the icon is associated with text, there's no need to do the thing where we describe the icon in guilabels and parentheses
- question?:
price-list-->pricelistsince that's how we've been spelling it the rest of the doc? - required: drop "price" from "cost" since the field label in Odoo is "Cost"
| After you made these changes, click :guilabel:`Update Prices` to update the product price and | |
| margin. The margin is recalculated based on the price-list-adjusted sales price and the product's | |
| cost price. | |
| After making the changes, click [NEEDS ICON] :guilabel:`Update Prices` to update the product's *Sales Price* and | |
| *Margin*. The margin is recalculated based on the pricelist-adjusted *Sales Price* and the product's | |
| *Cost*. |
| margin. The margin is recalculated based on the price-list-adjusted sales price and the product's | ||
| cost price. | ||
|
|
||
| .. image:: margin/SO-with-applied-pricelist.png |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
super minor but we don't have any capitalizations with our images, so can you change all the image names from SO- to so-?
|
|
||
| .. image:: margin/SO-with-applied-pricelist.png | ||
| :align: center | ||
| :alt: Sales order with margins recalculated based on the price-list adjustment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| :alt: Sales order with margins recalculated based on the price-list adjustment. | |
| :alt: Sales order with margins recalculated based on the pricelist adjustment. |
optional
5486256 to
79e31a8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
7519bbb to
cc01980
Compare
Co-authored-by: Felicia Kuan <[email protected]>
cc01980 to
64d27ad
Compare
|
@robodoo r+ |
closes #15049 Signed-off-by: Megan Valenzuela (meval) <[email protected]> Co-authored-by: Felicia Kuan <[email protected]>


Created a new Margins page for Sales.
task link